Closed zdohnal closed 1 year ago
The issue is originally reported for CUPS - https://github.com/OpenPrinting/libcupsfilters/issues/33 - and the reporter says PS and PXL drivers do not work for him too, so there might be investigation about the other PDLs too.
@tillkamppeter ping
Describe the bug If PPD uses PDF as output format and uses PJL, printing does not work for printers installed with such PPD - output file is created, but it is broken due:
(There no new line between the last PJL command and start of PDF)
To Reproduce out.pdf.txt log.txt ricoh-bad.ppd.txt
$ PPD=ricoh-bad.ppd CONTENT_TYPE=text/plain FINAL_CONTENT_TYPE=application/vnd.cups-pdf /usr/lib/cups/filter/universal 1 root '' 1 '' /etc/fstab > out.pdf $ netcat < out.pdf
(the file is not printed)
Expected behavior Printed file
System Information:
Additional context The discrepancy in the output file happens because the value of the option JCLToPDFInterpreter is not decoded when reading it from PPD file - decoding is hidden only for CUPS 3.X:
For CUPS 2.X, the option and value stays among PPD attributes value, where it is not decoded.
I can see two ways how to fix this:
1) remove the ifdefs related to this value - I'm not entirely sure why only this part should be different for CUPS 3.x/2.x,
2) make
ppd_decode()
extern, and call it inppdEmitJCLPDF()
when we have CUPS 2.x.@tillkamppeter which one do you prefer? (I have patch ready for the second for the record)