rrthomas / pdfjam

The pdfjam package for manipulating PDF files
GNU General Public License v2.0
378 stars 28 forks source link

Preserve original page size and orientation #77

Closed RalfJung closed 7 months ago

RalfJung commented 7 months ago

One of my main usecases for pdfjam is to extract some pages from a PDF file. (I don't know any other utility that can do that.) Unfortunately, it seems like pdfjam will change the page size when doing that. What I expect to happen is that each page has exactly the same layout as it did in the original document, but instead the new document is entirely in portrait A4 no matter the page size and orientation of the original document. I can set --landscape but then if the original document was not A4 the page size is still wrong. Figuring out the exact page size is non-trivial.

Is there any way to take some pages from a PDF file without having to explicitly tell pdfjam what their size is?

rrthomas commented 7 months ago

psselect from PSPDFUtils would be my answer (disclaimer: I wrote and maintain PSPDFUtils, whereas I'm just the emergency interim maintainer of pdfjam!)

RalfJung commented 7 months ago

Thanks! I've found pdftk can also do it.