[ic] Linux label printers

doug1 at ultimatepassage.com doug1 at ultimatepassage.com
Tue Jan 18 19:45:47 EST 2005



On Mon, 17 Jan 2005, Grant wrote:

>>> I'm planning on switching from Windows and its USPS and FedEx shipping
>>> software to Linux and IC for my shipping workstation.  I'm hoping to
>>> use some of the tags posted to the list to be able to print USPS and
>>> FedEx shipping labels, but I'm having trouble finding a thermal label
>>> printer that will work in Linux.  Does anyone have a recommendation?
>>>
>>> Also, if anyone is interested in a Zebra LP 2844 that works great in
>>> Windows but I can't get to work in Linux, let me know.  A few rolls of
>>> labels too.
>>>
>>> - Grant
>>>
>>
>>    If you really want to get rid of it I'll take it for sure, but that is
>> exactly what
>> I use for printing FedEx labels.  I have it connected via the serial port
>> and do
>> an open of file and printer, write file to printer and close.  The file is
>> a PNG
>> image returned from FedEx.  Here is the Perl code I have which I'm sure
>> can be improved upon
>>
>>   open (PNG, $labelFile) or die "Could not open PNG file $!";
>>   open (ZEBRA, ">/dev/ttyS0") or die "Could not open serial port $!";
>>     my $line = '';
>>     $line = <PNG>;
>>     while ($line) {
>>     print ZEBRA $line;
>>       # This will send it to the Zebra printer print ZEBRA $line;
>>       $line = <PNG>;
>>     }
>>
>>   close(PNG);
>>   close(ZEBRA);
>>
>> Does anyone use this printer for printing USPS labels and if so what
>> format
>> of file do you write to the printer ?
>>
>> Jon
>
> Hello Jon and Brian, I'm finally ready to test printing USPS labels to
> this Zebra on a Linux system.  The USPS docs:
>
> http://www.usps.com/webtools/htm/Delivery-Confirmation.htm
>
> tell me that the XML data I'm seeing USPS return for the label itself
> is Base64-encoded in TIF.  Jon, have you had any luck getting your
> Zebra to print one of these USPS labels?
>
> - Grant
>
> P.S. I was planning on setting up FedEx Ground printing like this
> also, but they can't get up my hill so pickups won't work.  I'll be
> opening a UPS account and setting up this type of shipping with them.
> Has anyone set up UPS/IC shipping before?
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>
Just about any thermal label printer will work with Linux.  We use 
serveral old RJS barcode printers.  A few Printronix barcode printers and 
over a dozen zebra printers.  There are really 2 issues that need to be 
addressed.  The first issue is simply getting over the connectivity hump. 
If you are using a serial connection, the baud rate, parity, and handshake 
issues must all match.

Once this is done, the next step is to look at the programmers guide for 
the appropriate printer.  For example to print hello world on a zebra 
printer you need something like this:
A30,50,0,3,1,1,N,"Hello World"^M
The first byte tells the printer to use straight alpha.  The remaining 
bytes up the the first comma provide the horizontal print position.  The 
50 after the first comma is the vertical print position (in dot rows, I 
think).  The next commas  separated byte is the orientation (upside down, 
vertical, etc), the next comma separted byte is font size, etc.  The last
  element is the actual text to be printed in quotes.

Here is a sample output to print a complete UPS Next Day air label.  The 
lower case "b" and the characters that follow generate the 2D barcode. 
The lines that start with an uppercase "B" generate a conventional 
barcode.


M135,2,100^M
I8,0,001^M
N^M
R5,10^M
S4^M
D15^M
ZT^M
LO20,377,771,4^M
LO247,377,4,234^M
LO20,749,771,4^M
A505,2,0,4,1,1,N,"3 LBS"^M
A650,2,0,4,1,1,N,"1 OF 1"^M
A30,3,0,3,1,1,N,"Ultimate Passage"^M
A30,22,0,3,1,1,N,"(800) 344-8697"^M
A30,44,0,3,1,1,N,"2462 Beechwood"^M
A30,66,0,3,1,1,N,"Westlake OH  44145"^M
A30,166,0,2,2,2,N,"SHIP"^M
A30,203,0,2,2,2,N,"TO:"^M
A131,166,0,4,1,1,N,"TOM TURBO"^M
A131,192,0,4,1,1,N,"123 EASY STREET"^M
A131,219,0,4,1,1,N,""^M
A131,245,0,1,2,4,N,"NORFOLK NE 68701"^M
b20,383,M,m2,"001,840,68701,0000,[)>^^01^]961Z13063998^]UPSN^]478173^]018^]^]1/M
A300,397,0,4,2,4,N,"NE 687 0-00"^M
B360,510,0,1,3,4,80,N,"42068701"^M
LO20,611,771,4^M
LO20,612,771,4^M
LO20,613,771,4^M
LO20,614,771,4^M
LO20,615,771,4^M
LO20,616,771,4^M
LO20,617,771,4^M
LO20,618,771,4^M
LO20,619,771,4^M
LO20,620,771,4^M
LO20,621,771,4^M
LO20,622,771,4^M
LO20,623,771,4^M
LO20,624,771,4^M
LO20,625,771,4^M
LO20,626,771,4^M
A30,640,0,4,2,3,N,"UPS NEXT DAY AIR"^M
A670,640,0,5,2,2,N,"1"^M
A30,720,0,4,1,1,N,"TRACKING #:"^M
A225,720,0,4,1,1,N,"1Z 478 173 01 1306 3998"^M
B121,769,0,1,3,5,202,N,"1Z4781730113063998"^M
LO20,992,771,4^M
LO20,993,771,4^M
LO20,994,771,4^M
LO20,995,771,4^M
LO20,996,771,4^M
LO20,997,771,4^M
LO20,998,771,4^M
LO20,999,771,4^M
LO20,1000,771,4^M
LO20,1001,771,4^M
LO20,1002,771,4^M
LO20,1003,771,4^M
LO20,1004,771,4^M
LO20,1005,771,4^M
LO20,1006,771,4^M
LO20,1007,771,4^M
A30,1044,0,3,1,1,N,"ORDER NUMBER 2006"^M
A30,1066,0,3,1,1,N," P.O. NUMBER 3343844-1"^M
A598,1179,0,2,1,1,N,"URC 08/2001"^M

Bruce


More information about the interchange-users mailing list