[HOME(Mark Whitis)] [Contact] [Resume] [Browser Friendly] [No Spam] [FEL] [DBD]

pbm2lwxl - A driver for the CoStar Labelwriter XL

Overview

pbm2lwxl is a device driver for the CoStar Labelwriter XL and compatible printers. It takes plain (not raw) pbm files. The PBM file format was popularized by the PBM (aka netbpm, pbmplus, etc) utilities by Jef Poskanzer. There are utilities to convert from almost any image format to PBM/PPM/PGM/PNM, and vice versa. Ghostscript supports pbm output. This driver was written in the C language for Linux but should compile on any un*x compatible system as well as many other operating systems; no operating system specific calls were used.

Writing a PBM filter is an appropriate way to write a printer driver for a simple raster based printer.

Many idiotic companies only write windows drivers for their printers and then their products only work with microsoft windows, and often not even will all versions of windows. Write a PBM or ghostscript driver and your product will work with MS-DOS, Windows 3.1, Windows 95, Windows 98, Windows NT, MacOS, OS/2, Linux, FreeBSD, NetBSD, OpenBSD, 4.3BSD, Solaris, Sunos, AIX, HPUX, Irix, Digital Unix, SCO Unix, Ultrix, VMS, NeXTstep, Amiga, Plan 9, SMS/QDOS.
CoStar LabelWriter II 9600 192 Should work  
CoStar LabelWriter XL+ 19200 448 Should work  
CoStar EL40 ? 192? 1-1/2" wide Should work  
CoStar EL60 ? 448? 2-1/4" wide Should work  
CoStar Turbo ? 448? 2-1/4" wide Should work  
Avery Personal Label Printer 19200 192 Tested - Ok  
Avery Personal Label Printer+??? 19200 448 Should work  
Sieko any n/a n/a Should NOT work. See below
Sony any n/a n/a Unknown See below

Download

Download pbm2lwxl.tar.gz

License

Copyright 1999 by Mark Whitis. All Rights Reserved. Availible under this license. Not GPL tainted. The labelwriter XL uses 19200. Older models use 9600 I think the avery units are relabeled costar units - they look identical inside and out

usage

The printer uses xon/xoff - configure spooler appropriately or use something like: "stty 19200 ixon usage: pbm2lwxl [ width [height] ] width and height are in pixels. width should be 192 (1") or 448 (wide models). You can redirect the output directly to the serial port the printer is attached assuming you don't already have a spooler running on that port and you have already set the baud rate and XON/XOFF flow controls.

scripts

You may need to edit the pathnames to utilities in these scripts. You will probably want to use one or more of the following utilities
    mpage -1 -o -m720t0lrb -L6      - ascii to postscript 
    ghostscript -sDEVICE=pbm -sOutputFile=- -q -dNOPAUSE -r192x192 -g700x192 -dSAFER - -c quit 
    pnmflip -cw   - to rotate 90 degrees 
    pnmnoraw      - convert from raw to plain (ascii) pnm format. 
Note that the ghostscript command shown above generates 700x192 which should be pnmflip'ed to get 192x700 for printing. Change "-L6" to "-L12" on the mpage command to fit more lines on a label.

This program does not use libpnm. No particular reason. It was just faster to write code which read a plain pbm file than to figure out how to use libpnm and if its licensing was acceptable. libpnm is more flexible but we really don't need that flexibility here.

lpr

I haven't integrated this with lpr yet. The biggest question is how to set XON/XOFF. The documentation on fs/fc printcap directives is a bit vague (to say the least). It is possible I might have to write a trivial output filter program to do xon/xoff. fs=IXON?????????:lp=/dev/cua1:br#19200:

Bar Codes

Check out pbmupc, part of the netpbm package, probably already installed on most Linux boxes.

Other companies

Avery

The avery products look like rebranded costar products. I have several of the 1" models around and will test them soon.

Seiko

This program will not drive seiko label printers. For a driver program for seiko printers, check out slap. Slap is a rather bloated program which tries to reinvent the wheel instead of cooperating with the existing rasterizer (ghostscript). It comes with a bunch of fonts. The result appears to be that you have a much more complicated program but much less flexibility in printing labels.

Sony

I know nothing about sony label printers

Dymo

It looks like dymobought costar which is now called Dymo-Costar. Don't confuse these printers, however, with the continuous laminated thermal transfer label tape printers made by Brother and Casio, some of which were rebranded by Dymo. And certainly don't confuse these with the even older mechanical embossing printers by Dymo or the old Kroy mechanical ribbon transfer label makers.

Industrial Bar code printers

I don't have any information at the moment on the industrial strength bar code printers.

This file is maintained by Mark Whitis (whitis@dbd.com).