[cups.general] Print PCL with printer info from PPD?

Helge Blischke h.blischke at acm.org
Tue Mar 13 12:31:12 PDT 2012


James Cloos wrote:

> Helge Blischke <h.blischke at acm.org> writes:
> 
>> As for your hypothetical problem, I doubt it would be worth the
>> effort, and I don't think there sould be any PDF (conforming to the
>> spec) that could bring your printer in PostScript mode to it's knees.
> 
> Don't be so sure. :(
> 
> It depends, of course, on what the pdftops filter uses to do the
> conversion.
Well, Xpdf's pdftops, the poppler based pdftops equivalent, or a recent 
Ghostscript (>= 9.01 which supports the ps2write device) all generate  
fairly well formed PostScript streams.
> 
> Rather than try to automatically use the KM-provided ppd, it may be
> possible to use the ppd as a guide to writing one which uses gs to
> generate pxl or pcl.  In theory the ps snippits in the ppd can be
> re-written as PJL commands.
> 
> You can try sending this pjl file to the printer (if you use ethernet,
> use nc or netcat to send the file to port 9100 and capture the return
> to a file; something like >> nc magic 9100 <info.pjl >magic.info <<).
> 
> <ESC>%-12345X at PJL INFO ID
> @PJL INFO CONFIG
> @PJL INFO FILESYS
> @PJL INFO MEMORY
> @PJL INFO PAGECOUNT
> @PJL INFO STATUS
> @PJL INFO VARIABLES
> @PJL INFO USTATUS
> 
> (The <ESC> there is ascii 0x1b.)
> 
> That will give you the pjl names for the trays, output bins, paper
> sizes, the supported languages, paper types and anything else you can
> set via pjl commands.
> 
> All you need, then, is to write a pcltopcl filter, as Michael wrote,
> and a matching ppd (based on the km ppd and the existing pcl/pxl ppds).
> :-)
.... and you still have to interprete the incoming PCL stream to a fairly 
large extent in order to eliminate PCL commands that will (or may) undo or 
disturbe the options from the "PPD".
> 
> -JimC

Helge






More information about the cups mailing list