+++ This bug was initially created as a clone of Bug #837790 +++ Description of problem: I tried to print more than one file to a cups-pdf printer in *one* lpr command. But the printing fails: 1. In one case, only the first file is printed, but the generated pdf file is multilated 2. In most other cases, no file is printed (no pdf file is generated), and the lpq command shows that all print jobs remain in the print queue. I have to cleanup them with lprm, and additionally to restart cups. Version-Release number of selected component (if applicable): cups-pdf-2.6.1-1.fc17.x86_64 cups-libs-1.5.2-12.fc17.i686 cups-1.5.2-12.fc17.x86_64 cups-libs-1.5.2-12.fc17.x86_64 cups-pk-helper-0.2.2-1.fc17.x86_64 How reproducible: Almost all times Steps to Reproduce: 1.lpr <file-1> <file-2> ... -P<pdf-printer> 2. 3. Actual results: see description Expected results: All file are properly printed into pdf-files Additional info: --- Additional comment from Joachim Backes on 2012-07-05 09:26:28 UTC --- section for the pdf printer in /etc/cups/printers.conf ------------------------------------------------------ <Printer PDF> UUID urn:uuid:af88cddf-b230-3dcb-6c99-33a1e6a8cf74 Info PDF MakeModel Generic CUPS-PDF Printer DeviceURI cups-pdf:/ State Idle StateTime 1341476143 Type 8450124 Accepting Yes Shared Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy stop-printer Option media na_letter_8.5x11in Option output-bin face-down Option print-color-mode color Option print-quality 4 Option printer-resolution 300x300dpi </Printer> --- Additional comment from Joachim Backes on 2012-07-05 09:30:04 UTC --- cups-pdf specific lines in /var/log/cups/error.log: --------------------------------------------------- W [02/Jul/2012:10:36:40 +0200] failed to find device: cups-PDF W [03/Jul/2012:07:25:17 +0200] failed to find device: cups-PDF W [05/Jul/2012:07:05:18 +0200] failed to find device: cups-PDF W [05/Jul/2012:10:11:05 +0200] failed to find device: cups-PDF W [05/Jul/2012:10:15:30 +0200] failed to find device: cups-PDF W [05/Jul/2012:11:41:44 +0200] failed to find device: cups-PDF W [05/Jul/2012:10:47:28 +0200] failed to find device: cups-PDF W [05/Jul/2012:10:50:12 +0200] failed to find device: cups-PDF W [05/Jul/2012:10:52:48 +0200] failed to find device: cups-PDF W [05/Jul/2012:10:56:06 +0200] failed to find device: cups-PDF W [05/Jul/2012:11:04:45 +0200] failed to find device: cups-PDF --- Additional comment from Fedora End Of Life on 2013-07-03 22:27:53 UTC --- This message is a reminder that Fedora 17 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 17. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '17'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 17's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 17 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 17's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. --- Additional comment from Joachim Backes on 2013-07-04 03:49:53 UTC --- Same problem in F19: "lpr -P<pdf-printer> /etc/passwd /etc/group": in the PDF target directory only the printed /etc/passwd appears, but no printout of /etc/group. --- Additional comment from Joachim Backes on 2013-10-24 05:26:28 UTC --- Same behaviour in F20. --- Additional comment from Fedora End Of Life on 2017-07-25 18:30:36 UTC --- This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. --- Additional comment from Joachim Backes on 2017-07-25 19:09:06 UTC --- Same behaviour in F26 --- Additional comment from Joachim Backes on 2017-11-14 08:58:27 UTC --- Same behaviour in F27 --- Additional comment from Joachim Backes on 2019-04-28 17:05:00 UTC --- Same behaviour in F30! --- Additional comment from Bryan Mason on 2019-06-05 23:36:47 UTC --- This problem occurs because cups-pdf stops processing input as soon as it sees %%EOF. A multi-page document created by texttopaps, texttops, or a combination of texttpdf/pdftops has multiple %!Adobe-PS-3.0 ... %%EOF sequences in it (one for each file), so in a multi-file document, only the first file is processed and the rest is thrown out.
Created attachment 1577734 [details] Proposed patch This patch changes the way PS is read. Instead of starting with "%!PS" and ending at "%%EOF", it reads the entire input file, but only copies to the output those lines between "%!PS-Adobe-" and "%%EOF". It also looks for "^D%!PS-Adobe-" as a beginning-of-document marker because the CUPS filters don't remove the EOF marker when concatenating PS files together and don't insert a newline after the EOF marker, so it ends up on the same line as the beginning of the next PS document, like: %!PS-Adobe-3.0 ... %%EOF ^D%!PS-Adobe-3.0 Quick tests in RHEL 7 confirm that you can now run: lp -d cups-pdf /etc/fstab /etc/fstab /etc/fstab /etc/fstab and a single four-page PDF document is created.
Same behaviour in F33
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
EPEL 7 entered end-of-life (EOL) status on 2024-06-30.\n\nEPEL 7 is no longer maintained, which means that it\nwill not receive any further security or bug fix updates.\n As a result we are closing this bug.