pdftk

Doncha love free software? Have I asked that before?

I had a 91-page PDF document with the pages in backward order. That’s annoying. I tried to use Acrobat (Standard) to reverse the pages, but I’m too dumb to make that work. My best guess after 20 minutes of searching Adobe’s help and the web was to print to PDF with the ‘reverse pages’ turned on. That did not produce a satisfying result.

Then I popped over to Freshmeat to ask that oasis of software goodness for some help. In less time than it took to try the print experiment (it had cranked for a good 15 minutes…), I found pdftk, installed it, learned how to get it do do what I wanted (pdftk manual.pdf cat 91-1 output manual-rev.pdf), did it, got a satisfying result, and mailed the developers a thank you note.

Woot.

6 Comments

  • J D
    2006/07/04 - 17:08 | Permalink

    Thanks, this was exactly my problem and what I needed to accomplish and worked well for me.

  • Hotte
    2009/06/17 - 01:44 | Permalink

    Thank you too, I had the same problem and already knew pdftk, but didn’t know it could do it 🙂

  • Churchill
    2010/01/07 - 04:43 | Permalink

    Same as Hotte !
    Thank you.

  • Anonymous
    2011/01/13 - 23:43 | Permalink

    Here’s an even better one. Don’t have a fancy duplex scanner? Scan the fronts, flip the doc over and scan the backs. Now you’ve got two pdfs and you need to merge them to get your scanned document back into a single file.

    > pdftk A=fronts.pdf B=backs.pdf shuffle A Bend-1 output document.pdf

    (note the pages in the backs.pdf are in reverse order…hence the ‘end-1’)

  • Jack Grahl
    2012/03/10 - 05:09 | Permalink

    Note that you can say “end-1” instead of “91-1” if you don’t know how many pages the document has.

  • Sral
    2012/03/10 - 15:28 | Permalink

    More generally,

    pdftk input.pdf cat end-1 output reversed.pdf

    will do the trick; no need to know the number of pages.

  • Leave a Reply

    Your email address will not be published. Required fields are marked *