[ic] Linux label printers

Grant emailgrant at gmail.com
Wed Jan 19 15:45:01 EST 2005


> Zebra printers are not capable of printing a TIF. Newer zebra printers are
> capable of printing PCX files.  Most of the older ones use a GRF format.
> The GRF format is an uncompressed pure hexadecimal data stream without any
> of the PCX header information.  The simplest way to create a GRF file is
> to parse the PCX header for the size and then strip off the first 128
> bytes.
> 
> To quote my zebra users guide the format of the command to download
>   graphics is:
> ~DGd:o.x,t,w,datastream
> where ~DG puts the printer into graphic mode
> d = destination name dfault value R: (DRAM)
> o = name of image
> x = extension (always GRF)
> t = total bytes
> w = byte per row
> data = actual data stream in uncompressed hex
> 
> Here is a small program to print a triangle:
> ~DGR:TRIANGLE.GRF,42,6,
> F0000000000000
> FF000000000000
> FFFF0000000000
> FFFFFF00000000
> FFFFFFFF000000
> FFFFFFFFFF0000
> 00000000000000
> ^XA
> ^F050,50
> ^XGTRIANGLE.GRF,1,1^FS
> ^XZ
> 
> The DGR command loads the stripped PCX file into the printers RAM. The ^XA
> marks the start the label command string.  The ^F050,50 sets the X and Y
> coordinate to 50 dots from the left and 50 dots down from the top.  The
> ^XG command print the triangle prints the triangle.  The 1,1 on the end
> of the XG command controls the magnfication (scaling) on the X and Y
>   axis.  The ^XZ command renders the label.
> 
> This may sound complicated but once you get the hang of it, it's not too
> difficult.  The hardest part is parsing the PCX header information to get
> the PCX size and then stripping off the header information.
> 
> Bruce

Hey Bruce, I've got ImageMagick converting the TIF labels I get from
USPS to PCX.  My Zebra LP 2844 is supposed to support PCX:

"Graphic features: Line and box drawing & PCX graphic storage"
http://www.zebra.com/PA/Printers/product_LP2844_hs.htm

I'm having no luck getting the Zebra to print it with the methods I've
tried though.  I haven't tried setting up commands like you outlined
above, but it sounds like your printer might be a bit older than mine?

Do you know if the printer should be in line mode or page mode?  I
believe mine is in page mode, but Zebra's instructions for switching
to line mode don't seem to work.  I'll call them if you think I should
be in line mode.

- Grant


More information about the interchange-users mailing list