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

Johannes Meixner jsmeix at suse.de
Wed Mar 14 02:39:56 PDT 2012


Hello,

On Mar 13 12:31 Helge Blischke wrote (excerpt):
> James Cloos wrote:
>> 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.
....
>> All you need, then, is to write a pcltopcl filter ...
>> 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".

I think there is some comfusion here:

As far as I understand one could
either
- generate generic PCL without printer specific settings
   plus a PPD with usual JCL entries so that the printer specific
   option settings happen as usual via PJL commands
or
- generate generic PCL without printer specific settings
   plus a PPD with special entries so that the printer specific
   option settings can happen as PCL commands via a pcltopcl filter.

Off the top of my head I don't know if standard Ghostscript devices
for PCL printers (e.g. "ljet4") generate really generic PCL
without any PCL commands for printer specific settings.


Regarding generic PCL plus printer specific option settings via PJL:

As far as I remember the CUPS pstops filter adds JCL stuff (e.g. PJL
commands) from the PPD into the PostScript data but when then
those PostScript+PJL is processed by Ghostscript to generate PCL,
the added PJL gets lost.

Therefore one needs a special filter which
1. extracts and stores the PJL snipptets from PostScript+PJL,
2. runs Ghostscript to generate generic PCL from PostScript(+PJL),
3. re-adds the remembered PJL snippets to the generic PCL.

See the "PCL+JCL Printers" section in
http://en.opensuse.org/SDB:Information_for_Printer_Manufacturers_Regarding_Linux_Support

I made this article a longer time ago, perhaps something
is outdated meanwhile.

PostScript+JCL printers have out-of-the-box support in CUPS
but I don't know how it is for PCL+JCL printers.

Perhaps there is already some kind of out-of-the-box support
for PCL+JCL printers nowadays - perhaps via foomatic-rip:

The ChangeLog of foomatic-rip mentiones a lot regarding JCL
and it seems as if foomatic-rip might already support what
I wrote above for the "special filter", in particular:
-----------------------------------------------------------------------
2009-02-02  Till Kamppeter <till.kamppeter at gmail.com>
  * renderer.c: When foomatic-rip looked for JCL options in the
    binary output of the driver to merge them with JCL options from
    the PPD file, it read binary data into a C string, which causes
    problems when this data contains zeroes. Finally fixes Ubuntu bug
    LP: #303691.
-----------------------------------------------------------------------
"LP: #303691" is
https://bugs.launchpad.net/ubuntu/+source/foomatic-filters/+bug/303691

The "merge ... with JCL options from the PPD file" looks promising
but the real experts regarding foomatic-rip are Till Kamppeter
and Lars Uebernickel...


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer





More information about the cups mailing list