I was able to print .epl labels using RawPrinterHelper on epl printers , now i have one more requirement where i have to print image (.bmp , .pdf ) files on zebra S4M epl printer . please throw some light on where to start to get this done.
-
Is there any other way of approaching this issue .... Please any info or any suggestions would be helpful .... Thanks – devlearnron Nov 24 '13 at 01:50
2 Answers
First, convert your file to .PCX
(black/white only)
Next send this EPL command to the printer:
GM"NAME"1234<CR><LF>
where NAME
is the name you wish to give to the graphic (1 to 7 CaSe-SeNsItIvE characters), 1234 is the file-length in bytes and <CR><LF>
are carraige-return, line-feed.
Follow this DIRECTLY with the contents of the .PCX
file.
Print using
GG50,50,"NAME"<cr><lf>
where 50,50 are X,Y offset
GK"NAME"
will delete the graphic from printer memory.
-
How to convert image file to .pcx format , Is there any method or thirdparty controlls availabele for conversion ? – devlearnron Nov 25 '13 at 19:26
-
I have to do evertyhing dynamically in vb.net , above solution seems completely manual. – devlearnron Nov 25 '13 at 21:19
-
Irfanview for the conversion - includes documentation on automation. Then all you need is to write the load command with the target .PCX filelength and then the raw file itself - even vb should be able to do that! – Magoo Nov 25 '13 at 23:07
-
@Magoo i have a .txt file which contains ZPL code like: ^XA ^FO50,50^A0,60,60^FDTest^FS ^XZ But i am unable to print it's output on Zebra ZTC gc420t (EPL) printer. What should i do? – ArgaPK Nov 08 '17 at 10:52
If your system has the Zebra driver installed, you can programmatically call a program associated with the file type and tell it to print the file. For example, in c#:
ProcessStartInfo info = new ProcessStartInfo("[path to your file]");
info.Verb = "PrintTo";
info.Arguments = "\"[printer name]\"";
info.CreateNoWindow = true;
info.WindowStyle = ProcessWindowStyle.Hidden;
Process.Start(info);
(taken from How to print various file types programmatically)
If you don't have the driver installed, you will have to use EPL to print. Furthermore, you will have to convert the image to the EPL GW command and then send it through the original RawPrinterHelper class. The following page on Zebra's support site has a lot of resources for graphics printing in EPL: https://km.zebra.com/kb/index?page=answeropen&type=open&searchid=1385389854676&answerid=16777218&iqaction=5&url=https%3A%2F%2Fkm.zebra.com%2Fkb%2Findex%3Fpage%3Dcontent%26id%3DSO6630%26actp%3Dsearch%26viewlocale%3Den_US&highlightinfo=6292111,6,10#. While the content is too long to explain in a StackOverflow-friendly format, you should be able to walk through the examples there to get an idea of how to print bitmaps (and other image types). It will be difficult to print PDFs since they do not correspond to a traditional image format.

- 1
- 1

- 2,750
- 2
- 19
- 24