Done a bit more testing and capture the print job it looks like it only sends upto 16535 kB to the printer before it's then captured as a job? Make any sense?
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Chris Davis Sent: Monday, November 13, 2023 12:44 PM To: profoxtech@leafe.com Subject: RE: ZPL
Thanks Woody
That seems to behave the same as me using ...
STRTOFILE(label1.mlabel,"c:\batch\testlabel.txt") TYPE c:\batch\testlabel.txt TO PRINTER
If I do this with the example label from labelary it works fine, if I use it with my own label where I have an embedded image it doesn't. The embedded image command is long as it contains the data in hex format.
If I paste my own label into labelary it works, if I send me label to the printer via TCPIP socket using Chilkat it works. It just doesn't work when sending it via set printer to
Make sense?
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of juergen@wondzinski.de Sent: Monday, November 13, 2023 11:59 AM To: profoxtech@leafe.com Subject: RE: ZPL
Hi Chris,
You connect to the printer with a regular cPrinterName = GETPRINTER() SET PRINTER TO NAME (cPrinterName)
Then you open the printer SET PRINTER ON
And all commandlines starting with ??? get sent directly, without conversion of the Windows drivers. thus:
#DEFINE CR CHR(13)+CHR(10)
??? "^XA" + CR ??? "^CF0,60" + CR ??? "^FO50,50^GB100,100,100^FS" + CR
SET PRINTER OFF SET PRINTER TO
One caveat: The ??? command also translates embedded strings between curly braces:
??? "This is a printer control string: {27}Q{100} to set the right margin"
If you need to print that left curly bracket in real, then you need to do a "{{}"
wOOdy
-----Original Message----- From: ProFox profox-bounces@leafe.com On Behalf Of Chris Davis Sent: Monday, November 13, 2023 12:27 PM To: ProFox Email List profox@leafe.com Subject: ZPL
Hi All
Would anyone have any suggestions of how best to approach sending ZPL commands to a compatible printer?
If the printer is on the network I can get this to work using ChilKat such as https://www.example-code.com/foxpro/socket_connect.asp
But I have also found that you can get ZPL to a printer that is connected via USB or network using the Generic / Text Only Driver ... this works with a simple example from
https://labelary.com/viewer.html
but if the commands become more extensive (maybe because an image has been included) then this method goes wrong I think because the driver is doing something relating to page size? But not sure.
If possible I would like a native VFP method of connecting to either a USB or Network connected ZPL printer and be able to send whatever I like ... thoughts?
TIA
Chris Davis
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
[excessive quoting removed by server]