473,498 Members | 37 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Interleave merge pdf files

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.

Jul 22 '05 #1
2 4923
"Chirayu Krishnappa" <ch******@gmail.com> writes:
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.

--
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
It is difficult for men in high office to avoid
the malady of self-delusion. - Calvin Coolidge
Jul 22 '05 #2
Mark Jackson wrote:
"Chirayu Krishnappa" <ch******@gmail.com> writes:
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.


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

Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3365
by: Jamal | last post by:
I am working on binary files of struct ACTIONS I have a recursive qsort/mergesort hybrid that 1) i'm not a 100% sure works correctly 2) would like to convert to iteration Any comments or...
6
2856
by: Jamal | last post by:
I am working on binary files of struct ACTIONS I have a recursive qsort/mergesort hybrid that 1) i'm not a 100% sure works correctly 2) would like to convert to iteration Any comments or...
5
5854
by: ckoniecny | last post by:
I have the following two files: File1: 11 John Doe 33 Jane Doe 55 Steve Smith File2: 22 Joe Doe 44 Willy Widget
1
3442
by: earthwormgaz | last post by:
Is there anything in Boost (or elsewhere if needs be) that will allow me to diff/merge files? I am writing out a data file, and I want to merge it with an existing on if its there.
4
7209
by: Tom Jones | last post by:
I have an application that was originally built using Visual Studio 2003 that I upgraded to Visual Studio 2005. When I attempt to build the *.msi file in the deployment project, I am getting a...
1
1979
by: turnerca902 | last post by:
Hi Folks, I am working on a little project and hoping someone out there might offer me some info/insight. I have a folder containing about 50 html files where the contents look like this: ...
10
2442
by: Tammy | last post by:
Hello all, I am wondering what is the best way to declare a struct to be used in other c and c++ files. Such as for a C API that will be used by others. 1. Declaring the typedef and the...
1
14860
by: cristalink | last post by:
Hi, I have MS Visual Studio 2008 both Pro and Dev Team Edition SP1 installed. I've compiled a managed C++ .DLL which automatically had a manifest embedded, with the following dependency:...
0
3405
by: newlasdjfk | last post by:
Is anyone familiar with Zend Pdf framework and knows how to use it to merge two pdf-files. Trying to open and merge 2 pdf-files. Gives me the following error. ...
0
7124
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6998
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5460
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4904
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.