« Nuthatch | Main | Black Muscid flies »
Saturday
Mar192016

How to Reverse the Page Order in a PDF File

If someone scans the pages of a document in the wrong order then the resulting PDF file will have its pages in reverse order. On Linux this is very easy to fix. First install pdftk (if necessary):

  sudo apt-get install pdftk

Then enter:

  pdftk file1.pdf cat end-1 output file2.pdf

where file1.pdf is the name of your input file and file2.pdf the name of the ouput file.

(Thanks to emilien at Stack Overflow)

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.