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

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:
My Computer Properties image

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;

System variable dialgue image

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.

Trackbacks & Pings


  1. 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.

  2. @towsonu2003: I wrote a tutorial for that as well:

  3. Thanks for helping,
    after I am done how can remove the installed programs

  4. 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.

  5. 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.


  6. Thank you very much for this. Worked like a charm.

  7. Thanks mate, EXTREMELY helpful and so simple :)


    Nathan Moorhouse
    Systems Administrator
    Tabor College

  8. 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.

  9. Great tutorial. It worked perfectly for me.

    Queen’s University

  10. Can’t get it to work. At first it was telling me it couldn’t find my pdf’s now it says it can’t find initialization file which is located in the folder lib, not bin…so confused.

  11. Great work! This is amazing!

  12. Thanks dude. Great help.

  13. Nice tutorial. It worked once I figured out my own foul up. Thanks

  14. worked great, thank you for the tutorial!

  15. I use PDF split and merge.

  16. Hi All,

    Merging multiple files into single pdf is much easy.

    Down load pdftk and run one command in the command promt ..( Java. through loops can merge any number of)

    just go to PDFTK website…download the software and copy in the system32 folder and run one command can find in the website….

    I have done…very easy ….

Post a Comment

Your email is never published nor shared. Required fields are marked *

© 2006-2007 Maxim Software Corp.  All rights reserved.