[Printing-architecture] Number of copies in pure PDF workflow

Tobias Hoffmann lprint-list at thax.hardliners.org
Wed Oct 15 16:22:55 UTC 2014


On 15/10/14 15:12, Till Kamppeter wrote:
> b) patch cups, namely ppdEmitJCL() in emit.c.
>    As cups does detect PCL as JCL here and sets "JOB NAME", "DISPLAY" or
> "RDYMSG DISPLAY" that would be the best place to add PJL SET COPIES.
>    But this will affect all PPDs with JCL, e.g. when pure PostScript is
> used... and, in case the patch is not accepted upstream, cups-filters
> has to ship it(?)
>
> I will not ship patches for CUPS in the cups-filters upstream package.
> You could post an upstream bug report/feature request on CUPS
> (http://www.cups.org/str.php) to let the ppdEmitJCL() function add "PJL
> SET COPIES=X" with the number of copies taken from the command line
> arguments (4th argument, see "man filter").

Patching upstream would unfortunately require changing the function 
signature of ppdEmitJCL() -- or adding a new ppdEmitJCL2 function. And 
that would be for a deprecated API...

> We must look into whether we
> should generally add "PJL SET COPIES=X", or only under certain
> conditions (is another copy generation method supposed to be used?
> Should we have some PPD keyword to turn it on or off?).

I don't know...?

>
>> c) do not use ppdEmitJCL at all. We would loose e.g. JOB NAME, but have
>> better control over the output...
> Do you mean using the not very elegant method to copy the code of the
> function into cups-filters and modify it there?

Simply put ... yes.


> 2. setting ppd->jcl_ps=concat("...SET COPIES...\n",
> JCLToPDFInterpreter->value)
Attached a (untested) first patch to pdftopdf:
param.deviceCopies will always be 1 for ppd->manual_copies, so SET 
COPIES is only inserted when *cupsManualCopies is not set and more than 
1 copy is requested.

Please review.

> Also make the above-mentioned feature request for CUPS to discuss the
> SET COPIES in the ppdEmitJCL() of CUPS.
>
See my comment above.

   Tobias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pjlcopies-v1.patch
Type: text/x-patch
Size: 1450 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/printing-architecture/attachments/20141015/5f700915/attachment.bin>


More information about the Printing-architecture mailing list