On 10/07/2014 11:45 PM, Tobias Hoffmann wrote:I'm not sure what exactly is happening in your setup. Maybe your PPD is missing something (- and I'm not an expert for PPD/PJL)? Maybe you don't have a recent cups-filters (>= 1.0.34)? Maybe you're hitting some edge-cases that are not handled correctly in the current code? AFAIK no-one else has reported a problem with PJL in a pure pdf workflow, and I can't find an obvious flaw in the code which deals with PJL in pdftopdf. The code is also basically copied over from the old pdftopdf implementation (cups-filters <=1.0.20); if your PPD does hw copy with the old implementation, but not with >=1.0.34, I will probably be able to fix that.Tobias, do you know for what the call emitJCLOptions(stdout,ppd,param.deviceCopies); in the emitPreamble() function in pdftopdf_jcl.cc is good for? For me it looks like that it serves for inserting JCL options, but inserting JCL options is already done by ppdEmitJCL(ppd,stdout,param.jobId,param.user,param.title);
if (Copies option is specified in the PPD file) {
mark Number of copies specified
} else if (pdftopdfJCLCopies is specified in the PPD file) {
output JCL specified with JCLCopies
}
for (each marked options) {
if (pdftopdfJCL<marked option's name> is specified in the PPD file) {
output it's value as a JCL
} else if (pdftopdfJCLBegin attributes is specified in the PPD file) {
output "<option's name>=<marked choice>;" as a JCL
}
}
I can even comment out emitJCLOptions(stdout,ppd,param.deviceCopies); and the output stays the same.
What I want to have is that if param.deviceCopies is not 1 (= multiple hardware copies) that @PJL SET COPIES=... is added.
*OpenUI *Copies/Number of Copies: PickOne *OrderDependency: 100 AnySetup *Copies *DefaultCopies: 1 *Copies 1/1: "@PJL SET COPIES=1" *Copies 2/2: "@PJL SET COPIES=2" *Copies 3/3: "@PJL SET COPIES=3" *Copies 4/4: "@PJL SET COPIES=4" ... *CloseUI: *Copiessimilar to how Foomatic-based work?
The PPD author (printer manufacturer, ...) chooses to EITHER set "*cupsManualCopes: True" OR add *Copies / *pdftopdfJCLCopies / ... (i.e. whatever is required to generate correct JCL output for their printer model).Currently all works fine for PPDs with "*cupsManualCopies: True" as pdftopdf generates software copies then. Without this entry pdftopdf sends only one copy of the PDF content and adds only a comment for subsequent filters. It does not add anything to generate the copies on a PDF printer.