Splitting And Combining Odd/Even Pages With Pdftk
Splitting Document into Odd and Even Pages
This needs two commands, one to grab the odd pages, and one to get the even ones. Mine look like this:
pdftk hints.pdf cat 1-endeven output hints1.pdf pdftk hints.pdf cat 1-endodd output hints2.pdf
This leaves the original document intact, and creates two new ones with half the pages in each one.
Combining Documents With Alternate Pages
The interleave is a single command in pdftk, using the shuffle feature and giving two documents to use:
pdftk A=doc1.pdf B=doc2.pdf shuffle A B output complete.pdf
This creates the file complete.pdf
using alternate pages from each of the two documents you provide to the first two arguments. Very handy, either for the odd/even processing case I mentioned above, or I have also used this when printing two-sided documents which are made from different front/back sources.
If you use these, or have any tips to add, please leave me a comment – it’s always interesting to see what others are making with my favourite tools.
Came here for the shuffle trick. Thanks.
Only place in my google-scope for odd/even page extraction – thx (:
Clear and to the point. Saved my day. Thanks.
Excellent. Simple and effective. Thanks for the help!
The post that keeps giving :-) I come back here every few years. Much appreciated.
Just what I needed. Thanks!
Excellent. Just what I needed. Thanks!
Hi, Is there a way to uncollate collated pages?