Description of problem: Running a command like "lp -P 10- /etc/services" results in all pages being printed. The page-range option passed to pdftopdf in this case is "10-2147483647". pdftopdf doesn't handle this option properly. Version-Release number of selected component (if applicable): cups-filters-1.28.9-1.fc35 How reproducible: 100% Steps to Reproduce: 1. Run "lp -d <queue-name> -P 10- /etc/services Actual results: The entire /etc/services file is printed. Expected results: The first 10 pages of /etc/service shouldn't be printed Additional info: Test script and patch to follow shortly. Upstream PR: https://github.com/OpenPrinting/cups-filters/pull/399
Created attachment 1801001 [details] Proposed patch
Hi Bryan, thank you for reporting the issue upstream and for the patch! I was able to reproduce with: $ pdfinfo out.pdf Title: Author: root Creator: texttopdf/1.28.9 CreationDate: Tue Jul 13 11:16:06 2021 CEST Tagged: no UserProperties: no Suspects: no Form: none JavaScript: no Pages: 198 Encrypted: no Page size: 612 x 792 pts (letter) Page rot: 0 File size: 2199860 bytes Optimized: no PDF version: 1.3 $ /usr/lib/cups/filter/pdftopdf 1 root '' 1 'page-ranges=100-2147483647' out.pdf > final-longmax.pdf $ pdfinfo final-longmax.pdf Title: Author: root Creator: texttopdf/1.28.9 CreationDate: Tue Jul 13 11:16:06 2021 CEST Tagged: no UserProperties: no Suspects: no Form: none JavaScript: no Pages: 198 -------------------- (bad) Encrypted: no Page size: 612 x 792 pts (letter) Page rot: 0 File size: 319134 bytes Optimized: no PDF version: 1.3 Although pdftopdf is part of cups-filters, IMHO it would be great to have a regression test in cups upstream test suite too - sent upstream here https://github.com/OpenPrinting/cups/pull/208 .
Waiting on merging upstream.
Created attachment 1803510 [details] Backported patch from upstream
The patch was merged, proceeding with a build.
Created attachment 1803515 [details] Backported patch from upstream
FEDORA-2021-9b987f6e36 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-9b987f6e36
FEDORA-2021-8f6d7c517d has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-8f6d7c517d
FEDORA-2021-8f6d7c517d has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-8f6d7c517d` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-8f6d7c517d See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-9b987f6e36 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-9b987f6e36` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-9b987f6e36 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-9b987f6e36 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-8f6d7c517d has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.