Comment 17 for bug 872873

Revision history for this message
Till Kamppeter (till-kamppeter) wrote : Re: Printing duplex in reverse order doesn't work properly HP Officejet Pro 8500

Alexander, I could reproduce your problem on Oneiric, so no further files/data are needed from you for now.

The problem cannot be solved by doing changes in CUPS, it has to be solved by a fix in LibreOffice.

To fulfill your print settings, reverse order and duplex, LibreOffice sends the pages starting with the last page and terminating with the first, to get the reverse order, and for duplex it sends the job with the duplex attribute according to the PPD file of the printer.

CUPS does not know about that the job is reverse order. It simple gets a deck of pages and prints them in the order in which they come. The duplex attribute is passed on to the driver and the driver sends a command to the printer to print the pages double-sided. CUPS cannot know that the first page it gets is a front side and not a back side of the sheet, it does not know that the last page is page 1 which has to be a front side.

Possible solutions:

1. (Recommended) LibreOffice should not execute reverse order by itself but instead it should send the pages in their original order (page 1 first) and send the job with the reverse-order attribute for CUPS (you do not find it in the PPD, it is and option provided by the CUPS filters, it is "OutputOrder=Reverse"), simply added to the PPD options. Then CUPS has full control about the page management and knows that this is a job which is printed double-sided, in reverse order, and with an odd number of pages. This way CUPS will know to print a blank page before it starts printing the job starting with its last page.

2. LibreOffice could precede such jobs with a blank page. This is AFAIK what evince does.

In general, page management (reverse order, selected pages, even/odd pages, N-up, multiple copies, collate, ...) should get concentrated at one point, preferably CUPS and not be done partially by the application and partially by CUPS.