Given a PDF document, how do I change individual page orientation?
I'm using latest version of Ghostscript.
Join Stack Overflow to learn, share knowledge, and build your career.
|
Given a PDF document, how do I change individual page orientation? I'm using latest version of Ghostscript. |
||||
|
|
|
Why do you require usage of Ghostscript? Would it be acceptable to use another Free, Open Source Software tool running on the commandline, such as Anyway, here is how to rotate pages with Ghostscript. However, this may not work for your intentions, because you cannot force a certain orientation for an individual page only. It relies on an internal Ghostscript algorithm that tries to rotate pages automatically, depending on the flow of text inside the PDFs: Add one of these to the Ghostscript commandline you're using. If there is no text on a page (or if there is an automatic page rotation set to Probably you need to set the orientation for each page when extracting the pages. I don't think it would work when merging them back to the unified document (I have never tested this). In any case, I'd recommend to look at
This command will output pages 1, 2 and 3 as well as pages 5, 6, ... last un-rotated, but will rotate page 4 by 90 degrees (so the page header faces to the "west"). (However, be aware that this command can lead to unexpected results, depending on the original orientation of your input pages: You should check the orientation of all pages of your input PDF by running See here for more details: http://www.accesspdf.com/pdftk/ . |
|||||||||||||||||||||
|