about me

Scanning double-sided pages into a single PDF

Post replyCan't edit post
Watch topicCan't delete post
Wednesday, December 16 2009, 14:54
Having to scan 150 double-sided sheets, I ran into the problem of merging them into a single PDF file. We have an Automatic Document Feeder at the office, but it can only scan one side at a time, giving me two PDFs; one with all fronts, one with all backs.
The problem consists of two parts:
  1. The PDF containing the backs is in reversed page order, since I simply flipped the stack over and put it back in the ADF.
  2. The two PDF files need to be interleaved into a single file such that the back of page 1 lies between the front of page 1 and the front of page 2.
No fear, the PDF Toolkit is to the rescue!

To address problem 1, simply enter the following command:
pdftk backs.pdf cat end-1 output backs-rev.pdf

To address problem 2, enter the following set of commands:
mkdir pages
pdftk fronts.pdf burst output pages\%04d_a.pdf
pdftk backs-rev.pdf burst output pages\%04d_b.pdf
pdftk pages\*_?.pdf cat output combined.pdf
Presto! You have all the pages neatly combined into combined.pdf — in the correct order! You can then proceed to delete the temporary pages folder.
Actions:Post replyWatch topic
Mike (guest)
Saturday, January 9 2010, 23:45
Can't edit commentCan't delete comment
Thanks so much, I just got a scanner and wanted to scan a bunch of old grad school notes. This work liked a charm, so much better than any other big pdf programs!
Paul (admin)
Sunday, January 10 2010, 15:30
Can't edit commentCan't delete comment
I'm glad it worked! In my case the ADF didn't always grab a single page, so I ended up having to rescan a few pages. You can make sure that it worked correctly by counting the number of pages in the pages directory (and check that it is indeed two times the number of original sheets).
Post reply Hide comments

More updates

Click here to read more news items.
Members have extra privileges. You can login or register.
© 2005–2018 P. F. Lammertsma
No members currently online; 0 hits today by 0 unique users