Combine multiple PDFs into one merged document
It is very useful to combine multiple PDF documents into one file. This is useful especially if you accumulate many PDFs (newsletters, bills, etc.) over time. I will walk you through the process of doing this in Windows XP using only free software.
The first step is to download and install Ghostscript 8.53. You can download Ghostscript via Sourceforge.net.
The second step is to download and install PDFTK 1.12. You can download PDFTK via its homepage.
Note: When you install PDFTK it will appear as if nothing was installed (don’t worry, it is supposed to do this).
The third step is to go to My Computer >> Properties >> Select the Advanced Tab and Click on Environment Variables. This is shown below:

The fourth step is to select “Path” in the system variables and append the following line at the end of “Variable value:”
C:\Program Files\gs\gs8.54\bin;

You now need to restart your computer.
Make sure all of the PDF files you want to merge are in one directory. For the purpose of this tutorial we will assume that directory is C:\pdfmerge
Open up Command Prompt by going to Start >> All Programs >> Accessories >> Command Prompt.
In the command prompt you need to type the following commands (hitting enter after each command)
cd c:\pdfmerge
Copy and paste the following command into the command prompt:
gswin32 -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=MergedDoc.pdf -dBATCH first.pdf second.pdf third.pdf
You will now have a document named MergedDoc.pdf in your C:\pdfmerge directory.
Note: In the above command, change “MergedDoc.pdf” to whatever name you want your merged PDF to be. Also, change “first.pdf” “second.pdf” and “third.pdf” to the names of the PDF files you want merged.
Note: You can merge more than three documents by adding their names (i.e., fourth.pdf fifth.pdf, etc.)
Feel free to post any questions below and I will address them in a timely manner. I will post a similar method for Linux tomorrow.
Read more: Software, Windows, Productivity
Trackbacks & Pings
Comments
-
It’s so nice to do this in linux:
apt-get install pdftk
pdftk 1.pdf 2.pdf cat output out.pdf
and you’re done. -
@towsonu2003: I wrote a tutorial for that as well: http://www.codejacked.com/combine-multiple-pdfs-into-one-file-in-linux/
-
Thanks for helping,
after I am done how can remove the installed programs -
Brilliant! Quick batch file to do the dirty work, and I can pump out my brochures of merged PDFs in no time! Thank you much.
-
Worked perfectly!
Thank you for the advise for converting PDFs. I am surprised that something so simple isn’t readily available with acrobat or freeware.
Byron
-
Thank you very much for this. Worked like a charm.
-
Thanks mate, EXTREMELY helpful and so simple
Cheers,
Nathan Moorhouse
Systems Administrator
Tabor College -
This is a good piece of information but I ran into a problem. The above instructions caused substitution of another font in place of the original and the new font looks so ugly
because letters have been placed too close to one another. I would really appreciate if you could help me. Anyway, thanks.
-
Great tutorial. It worked perfectly for me.
Queen’s University

Combine multiple PDFs into one file in Linux at <> CodeJacked </> on 01 Jan 2007 at 6:23 pm
[…] Previously I posted how to merge multiple PDFs into one file in Windows. This is the Linux counterpart tutorial on how to combine multiple PDFs into one file. This process is really easy and quick and is extremely useful. […]
links for 2007-05-27 « D e j a m e S e r on 27 May 2007 at 8:28 am
[…] Combine multiple PDFs into one merged document It is very useful to combine multiple PDF documents into one file. This is useful especially if you accumulate many PDFs (newsletters, bills, etc.) over time. I will walk you through the process of doing this in Windows XP using only free software. (tags: pdf howto) […]