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

James Cloos cloos at jhcloos.com
Tue Mar 13 11:29:11 PDT 2012


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.

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).
:-)

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6




More information about the cups mailing list