Exchange odd and even pages in a pdf file?

Is it possible to exchange odd and even pages in a pdf file, e.g. page 1 and page 2 exchange, page 3 and page 4 exchange, …, assuming the pdf file has even number of pages?

Can it be done using some software e.g. pdftk or LaTeX?

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

It seems like pdftk’s shuffle feature will do this. From man pdftk:

      shuffle [<page ranges>]
             Collates pages from input PDFs to create a new PDF.  Works
             like the cat operation except that it takes one page at a
             time from each page range to assemble the output PDF.

The general format for a [<page range>] is given as

<input PDF handle>[<begin page number>[-<end page number>[<qualifier>]]][<page rotation>]

where qualifier may be either even or odd. In the case that you wish to take alternating even and odd pages from the same document until all pages are exhausted, you can omit the <input PDF handle> and <begin page number>-<end page number> specifiers leaving just

pdftk infile.pdf shuffle even odd output outfile.pdf

where infile.pdf is the file whose pages are to be swapped and outfile.pdf is a name for the output.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply