[cups.bugs] Failure to Print Multiple Copiee with Raw Option

Michael R Sweet msweet at apple.com
Sat Sep 13 08:34:20 PDT 2008

Don Badrak wrote:
>> OK, the way you are using this isn't supported - the printers may
>> take a PDF directly, but they need PJL commands to allow printing of
>> multiple PDFs in one connection.
> How can we send PJL when doing a RAW job?  Do we need to create a queue with no PPD?  We still want to print a a job that isn't PDF through the PostScript drivers (and all the other controls gained from the PPD).  But we need the already formatted PDF to go direct to the plotter.

You can't, that's the thing.  You *could* write a simple shell
script filter for PDF files and list it in the PPD files as:

     *cupsFilter: "application/pdf 0 myfilter"

where "myfilter" would live in /usr/lib/cups/filter and send the
multiple copies of the PDF file with the usual PJL leader and
trailer, e.g.:


     while test $copies -gt 0; do
         copies=`expr $copies - 1`

         printf "\e%%-12345X at PJL JOB\r\n"
         printf "@PJL ENTER LANGUAGE = POSTSCRIPT\r\n"
         cat $6
         printf "\e%%-12345X at PJL EOJ\r\n"

Then you don't need to print with -o raw and PDF files will be
printed without any filtering, and it will work for any kind of

You can also use the "@PJL SET COPIES = n" command to reduce the
amount of data sent, however that will produce uncollated copies.

 > ...
> IPP I was going to try next.  But, er, it isn't available on these
 > particular plotters.

Hmm, make sure the firmware is up-to-date.  Only very old and the
low-end integrated JetDirect's (used in some of the DeskJet printers)
should not support IPP.

Michael R Sweet                        Senior Printing System Engineer

More information about the cups-devel mailing list