HP laserJets Barcodes and CUPS

peter plinehan at dek.com
Wed Oct 19 08:25:56 PDT 2011


> > > Ok, so does that mean that you would always want to send the SetBarCode or do you only want to send it when a certain condition is met (and if so what is that contidion)  basically there are a few ways to do it, I'm just trying to figure out if we need to use MIME types or not, if not, an interface script is easiest, if so than we'll have to define a custom MIME type, filter, and PPD (it's not as bad as it sounds)
> > >
> > > > > So, there is an easy way and a hard way.  do you only print barcodes to this or do you print regular stuff too?
> > > > >
> > > > > > I need to be able to send text files, from RHEL 5,  to a HP Laserjet printer containing Barcode ( 128 format ) information.
> > > > > > Currently I have working, outside the application, the following
> > > > > >
> > > > > > lp -o raw  -d printername  SetBarCode
> > > > > > which sets up the font on the printer ( all the control codes/escape sequences are in the SetBarCode file)
> > > > > >
> > > > > > Then to print
> > > > > >
> > > > > > lp -o raw -d printername Filename
> > > > > >
> > > > > > With the Filename having been formatted with a CR and LF at the end of each line
> > > > > > and the escape sequences needed to select the Barcode font and return to normal font afterwards.
> > > > > >
> > > > > > The application developer has come back and said that the space he has for entering the print instruction is not long enough to contain all of this !!!
> > > > > >
> > > > > > And yes he could format up the SetBarCode + Filename into a single file BUt he still says that the -o raw ... causes the text to be too long.
> > > > > >
> > > > > > If I try to print the file without -o raw - I am told the file is empty
> > > > > >
> > > > > > Is there any way I can do this via a PPD file ? or a Filter ?
> > > > > >
> > > > > > All help appreciated
> > > > > > Peter
> > > > >
> > > > Paul,
> > > > I need to print both
> > > > The idea is to provide a barcode from some information on the page, to allow parts tracking
> > >
> > Paul,
> > The plan is to have text files sent to the printer, some of these may require a barcode to be printed. Currently I have managed to send a file to the printer which loads into Font 70 ( my choice of reference) a barcode font, which can be selected by means of Esc sequences in the print file.
> > This I can do by setting the print to be 'raw' eg lp -d .... -o raw  filename
> > The developer says that the command string is too long so I need to find another way of doing it.
> > Also, I have a suspicion that the file to be printed will need to be fully formatted before it is sent as a 'raw' file.
> > So here hoping you can help
> > thanks
> Ok, so one other question, do you have a PPD mounted to this printer already or is it just created as raw w/o a ppd.
Paul,
I have a ppd used for it : HP LaserJet 5000 Series Postscript (recommended)ie PPD for HP LaserJet 5000 Series

I have also experimented with using it as a raw but the text loses its formatting, unless I edit the text file to put a CR/LF pair at the end of each line





More information about the cups mailing list