#1072743 texlive-extra-utils: pdfxup: --pages option fails if page range omits start or end of range #1072743
- Package:
- texlive-extra-utils
- Source:
- texlive-extra-utils
- Submitter:
- Sanjoy Mahajan
- Date:
- 2026-04-24 19:21:02 UTC
- Severity:
- normal
The man entry for pdfxup says that --pages can handle an omitted start or end of range, e.g. "--pages 2-" or "--pages -5". However, using the following pdf file as a test (it's one page long) gives an error if either the start or end of the range is omitted. Omitting the end of the range: $ pdfxup --pages 1- /usr/share/cups/data/default-testpage.pdf -> processing options /usr/bin/pdfxup: line 405: [[: 1-: syntax error: operand expected (error token is "-") /usr/share/cups/data/default-testpage.pdf has 1 page(s); pages 1- do not exist. /usr/bin/pdfxup: line 405: [[: 1-: syntax error: operand expected (error token is "-") /usr/share/cups/data/default-testpage.pdf has 1 page(s); pages 1- do not exist. No pages to include. Aborting. Omitting the start of the range also fails: $ pdfxup --pages -1 /usr/share/cups/data/default-testpage.pdf Error: option '--pages' expects a range, not '-1'. Aborting. But omitting both start and end works as described in the man page: $ pdfxup --pages - /usr/share/cups/data/default-testpage.pdf -> processing options -> computing bounding box. -> producing final file final scale: 95.35675% -> cleaning
On 07.06.2024 13:09, Sanjoy Mahajan wrote: Hi, Are you willing to discuss this with the upstream author? https://www.ctan.org/tex-archive/support/pdfxup Thanks, Hilmar
Yes, I'll be happy to discuss it with upstream. Should I CC you? Or just update the Debian bug as needed?
08.06.2024 10:25:00 Sanjoy Mahajan <sanjoy@mit.edu>: I'm one of the TL maintainers, so keeping the bug in Cc is sufficient. Thanks. Hilmar
Thanks Sanjoy, much appreciated! Best regards Norbert
Dear Nicolas, I found a small bug in the TL pdfxup (on Debian) and filed a Debian bug report. The Debian TL maintainers suggested that I discuss it with you as upstream, as the bug is likely upstream. The bug report is in the Debian BTS: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072743> But here is a copy of that report: The man entry for pdfxup says that --pages can handle an omitted start or end of range, e.g. "--pages 2-" or "--pages -5". However, using the following pdf file as a test (it's one page long) gives an error if either the start or end of the range is omitted. Omitting the end of the range: $ pdfxup --pages 1- /usr/share/cups/data/default-testpage.pdf -> processing options /usr/bin/pdfxup: line 405: [[: 1-: syntax error: operand expected (error token is "-") /usr/share/cups/data/default-testpage.pdf has 1 page(s); pages 1- do not exist. /usr/bin/pdfxup: line 405: [[: 1-: syntax error: operand expected (error token is "-") /usr/share/cups/data/default-testpage.pdf has 1 page(s); pages 1- do not exist. No pages to include. Aborting. Omitting the start of the range also fails: $ pdfxup --pages -1 /usr/share/cups/data/default-testpage.pdf Error: option '--pages' expects a range, not '-1'. Aborting. But omitting both start and end works as described in the man page: $ pdfxup --pages - /usr/share/cups/data/default-testpage.pdf -> processing options -> computing bounding box. -> producing final file final scale: 95.35675% -> cleaning I am happy to test any patches. Best regards, -Sanjoy
I've discussed it with the upstream author, Nicolas Markey. He has fixed that bug and a few others, and the new version works on my tests too. That version (v2.12) will be (or has been?) submitted to CTAN. Meanwhile, here is the .zip file of that version that Nicolas sent me (and I tested):
Am 10.06.2024 um 08:48 schrieb Sanjoy Mahajan: Hello Sanjoy, Did you ever get a response to your report? Hilmar