[ic] Linux label printers

Brian Kaney brian at vermonster.com
Mon Jan 17 21:54:08 EST 2005

On Mon, 17 Jan 2005 Grant <emailgrant at gmail.com> wrote:
> I've got a decoded digital TIF to print now, but I need to figure out
> how to get the printer to spit it out.  I'm going to tinker with it
> into the night I hope.
> Please let me know if you can offer any guidance on going from a Linux
> system with no printing set up, to a Linux system printing to one of
> these Zebra LP 2844s from within a usertag.

Hi Grant,

Some background for FedEx you may (or may not) find helpful.  The
Business::Fedex::DirectConnect my business partner wrote can return EPL code
instead of a raster PNG or GIF image.

EPL (Eltron Printer Language) is an ASCII-based code when piped to any 
Eltron or
Zebra printer supporting EPL (most do including yours) will quickly spit out a
label.  In a recent application, we simply opened a printer handle using lpd
and output the ASCII code.  Here is some psudocode:

use Business::FedEx::DirectConnect;
my $t = Business::FedEx::DirectConnect->new();
$t->set_data(); $t->transaction();

open PRINTERHANDLE, "| lp -d zebra" || die "Can't open printer!";
print PRINTERHANDLE $t->label;

This method does away with TIFFs, GIFs, PNGs or any other raster 
images.  And I
am pretty sure UPS's API also supports EPL/ZPL as well.

Hope this helps.

- Brian

Reference: http://cpan.uwinnipeg.ca/module/Business::FedEx::DirectConnect

More information about the interchange-users mailing list