2

I am looking for a simple way to reverse the whole document's page order. So first page becomes page 7, second page 6, ..., seventh page 1.

Is there an easier way than reversing it afterwards using PDF printers or something else?

  • 3
    Try pdftk : pdftk in.pdf cat end-1 output reversed.pdf – DG' May 13 '15 at 10:19
  • Are you talking about just reversing the order of the physical pages, or are you talking about having LaTeX renumber the pages in reverse order? For example the book A (p1), B(p2), C(p3) could be presented as C(p3), B(p2), A(p1) or as A(p3), B(p2), C(p1), or several other possibilities. What is it exactly you seek? – Steven B. Segletes May 13 '15 at 10:51
  • 1
    Physical Pages. So, I suppose, C(p3), B(p2), A(p1) – Stefan May 13 '15 at 11:04
  • That would seem a lot easier to do after and outside of LaTeX (as postprocessing). – Steven B. Segletes May 13 '15 at 11:08
  • I thought a task as trivial as that would be extremely easy in LaTeX, as long as you know the command. Thank you for your input! – Stefan May 13 '15 at 11:19
3

This approach takes two separate LaTeX compilations. First, compile your test document in the normal way.

For example, let this be testfile.tex:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\centering
\scalebox{35}{A}\clearpage
\scalebox{35}{B}\clearpage
\scalebox{35}{C}\clearpage
\end{document}

Compile it, producing testfile.pdf.

Then compile the following MWE (changing the input-filename from testfile.pdf, as appropriate). The output of this compilation will produce a PDF in which the pages of your original document are reversed.

\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=last-1]{testfile.pdf}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.