Zippering two pdfs

1 September 2017 in cmd

If for some reason you have two pdfs with separated odd and even pages of a document, the following command zippers them into a single pdf. (Assuming odd.pdf and even.pdf have the same number of pages; in this case 8.)

qpdf --empty --pages $(for i in $(seq 1 1 8); do echo " odd.pdf $i even.pdf $i "; done) -- all.pdf