Cups: no longer prints duplicate pages when asked

Asked by Daryl

In an older versions of ubuntu/cups, that has been upgraded to 22.04/2.4.1 our work flow went like this;
- Generate a pdf (third party shipping booking system) which contains a cover sheet, one page per package, then a DG (dangerous goods declaration) sheet
- print the page for each package
- print 2 copies of the DG sheet.

To do this for a shipment of say 3 packages, you would request pages 2,3,4,5,5. This would print one copy for each package (contains the tracking codes and routing info) and the DG twice (as expected)

With Ubuntu 22.04 and cups version 2.4.1 recently installed clean (ie not upgraded from an older version) this no longer works - the duplicte "5,5" is ignored, and only one copy of page 5 is printed.

I can't see anything in the logs, it seems like there must be some code somewhere that is sanitising the requested pages and removing any duplication? I don't know where to look for this, i'm presuming its in the Ubuntu client drivers?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Daryl (ubuntuuone) said :
#1

More info;
If i try to use lpr;

lpr -o page-ranges=2,3,4,4 2023_12_13_10_11_Freman_A4Documents.pdf
lpr: Bad page-ranges values 4-4.

lpr on the older machine exhibits the same error
chrome's print system doesn't throw an error, but doesn't print the requested duplicates.
evince prints the pages correctly, so this must be a limitation in lpr (error) and chrome (ignores the request) that evince somehow works around?

I think the solution to my issue right now is to make evince the default pdf viewer, but it would be nice to be able to script this in future, and i would have thought that "lpr: Bad page-ranges values 4-4." is unnecessarily restrictive?
Do i turn this into a feature request?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

lpr -o page-ranges=4 -#2 2023_12_13_10_11_Freman_A4Documents.pdf

The -#x should print x copies of the thing (I don't use a printer so cannot verify)

May have to have a separate command for the duplicates like this

Source:
https://www.computerhope.com/unix/ulpr.htm

Can you help with this problem?

Provide an answer of your own, or ask Daryl for more information if necessary.

To post a message you must log in.