filter on text only queue

Mike dougherty at pbp.com
Fri Jul 16 16:58:09 PDT 2004


Please don't be put off by the apparent length, most is background:

   Crystal Reports refuses to allow the escape code (\x1B) to be sent in 
the text stream even though the printer is defined as text-only.  The 
line printer has a barcode printing mode that produces sufficient 
quality barcodes (3 of 9) for our purposes.  This mode is accessed 
through the use of escape sequences, that were no problem when we were 
using a character-based report writer to send the text stream to the 
printer.  Crystal Reports claims that it is a "page-based" rendering, so 
  escape sequences are (despite our best efforts) destroyed by the 
application before they ever make it to the text stream.

   My proposed solution was to use an alternate escape code (one that 
Crystal Reports would not discard in an unfriendly pursuit of idealism) 
and have the print stream filtered through a CUPS print queue to replace 
the alternate escape code with a real escape so the printer's "barcode" 
mode can be envoked.  This sounds feasible enough.

   After several hours, I have still not managed to get proof that this 
solution will work.  Mostly what I have is a pile of stair-stepped 
postscript and blank pages.

   Can someone please explain how to create the ppd file to call a 
filter which will replace a string (like "||eSc||") with an actual 
escape character (ascii(27), 0x1B)  Here's what i've been working with:

http://www.linuxprinting.org/pipermail/general-list/2004q1/004976.html
http://www.linuxprinting.org/pipermail/general-list/2002q4/003046.html








More information about the cups mailing list