Interleave merge pdf files

C

Chirayu Krishnappa

Hi,

I need to scan documents with pages having printed matter on both
sides. It is easiest to stack them in the autosheet feeder and let it
scan. I end up with one file (say A.pdf) containing the odd pages in
sequence. Similarly, I can end up with B.pdf containing the even pages.
I want to combine them into result.pdf which contains A.1, B.1, A.2,
B.2, A.3, B.3, ... (A.1 = page 1 of A.pdf).

Does someone know a simple way to achieve this? I noticed the other
thread on this newsgroup about merging lots of pdf files and
multivalent tools and pdftk were mentioned. However, I could not find a
way to do this using them. I am interested in another free tool or a <
25 lines python script (which may use any freeware library) to do the
same.

Thanks,
Chirayu.
 
M

Mark Jackson

Chirayu Krishnappa said:
Hi,

I need to scan documents with pages having printed matter on both
sides. It is easiest to stack them in the autosheet feeder and let it
scan. I end up with one file (say A.pdf) containing the odd pages in
sequence. Similarly, I can end up with B.pdf containing the even pages.
I want to combine them into result.pdf which contains A.1, B.1, A.2,
B.2, A.3, B.3, ... (A.1 = page 1 of A.pdf).

Does someone know a simple way to achieve this? I noticed the other
thread on this newsgroup about merging lots of pdf files and
multivalent tools and pdftk were mentioned. However, I could not find a
way to do this using them. I am interested in another free tool or a <
25 lines python script (which may use any freeware library) to do the
same.

I face exactly the same problem. Based on examination of the pdftk man
page I *think* it can be done by something like (untested):

pdftk A.pdf burst output %04d_A.pdf
pdftk B.pdf burst output %04d_B.pdf
pdftk *_?.pdf cat output combined.pdf

assuming fewer than 10,000 pages per document, of course.

I would be interested in an alternative approach which does not
generate a ton of intermediate pdfs.
 
S

ssteward

Mark said:
I face exactly the same problem. Based on examination of the pdftk man
page I *think* it can be done by something like (untested):

pdftk A.pdf burst output %04d_A.pdf
pdftk B.pdf burst output %04d_B.pdf
pdftk *_?.pdf cat output combined.pdf

assuming fewer than 10,000 pages per document, of course.

I would be interested in an alternative approach which does not
generate a ton of intermediate pdfs.

Here is a page that offers a couple related scripts (one bash script,
one DOS batch script) for doing this with pdftk in one swipe:

http://www.accesspdf.com/article.php/2005020408520076

Sid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top