This file (example for a book with a fold-out page) is created with LibreOffice and run through pdftopdf. It contains 3 pages:
1. A4 portrait, no rotation
2. A3 landscape, 90 degree rotation
3. A4 portrait, no rotation
So page size, orientation, and rotation vary.
Printing with the workaround of dropping "-origpagesizes" fails:
pdftops A4-A3-A4-3-pdftopdf.pdf
makes the second page being cropped to A4 portrait.
pdftops -paper A4 A4-A3-A4-3-pdftopdf.pdf
makes the second page being squeezed into A4 portrait.
In both cases the second page is correctly rotated.
So "-origpagesizes" is needed and without my patch
pdftops -origpagesizes A4-A3-A4-3-pdftopdf.pdf
leaves the second page unrotated and so on a printer which loads A3 paper short-edge-first the second page is not correctly printed. With my patch it gets rotated. The leaving out of the "%%DocumentMedia: ..." line in the PostScript output also assures that all PostScript viewers can cope with the changing page sizes.
Created attachment 90229 3-pdftopdf. pdf
A4-A3-A4-
This file (example for a book with a fold-out page) is created with LibreOffice and run through pdftopdf. It contains 3 pages:
1. A4 portrait, no rotation
2. A3 landscape, 90 degree rotation
3. A4 portrait, no rotation
So page size, orientation, and rotation vary.
Printing with the workaround of dropping "-origpagesizes" fails:
pdftops A4-A3-A4- 3-pdftopdf. pdf
makes the second page being cropped to A4 portrait.
pdftops -paper A4 A4-A3-A4- 3-pdftopdf. pdf
makes the second page being squeezed into A4 portrait.
In both cases the second page is correctly rotated.
So "-origpagesizes" is needed and without my patch
pdftops -origpagesizes A4-A3-A4- 3-pdftopdf. pdf
leaves the second page unrotated and so on a printer which loads A3 paper short-edge-first the second page is not correctly printed. With my patch it gets rotated. The leaving out of the "%%DocumentMedia: ..." line in the PostScript output also assures that all PostScript viewers can cope with the changing page sizes.