Winston was asking me if I know a way to merge one or more pdf files so that the contents of all the files would appear in one pdf file at the end. A quick research revealed a software pdftk - pdf toolkit -which can be used to merge and split pdf files. Many shareware programs exist that do the same thing but pdftk seems to be one of the few that can merge pdf files for free.
Pdftk runs from the command line which means you need to unpack the software into a directory that you can access easily. I put the file into c: for testing purposes along with two pdfs called 123.pdf and 456.pdf.
If you run pdftk without parameters you get a quick output that details the most important parameters. Lets take a look at the possible operations:
Merge pdf files:
pdftk 123.pdf 456.pdf output 123456.pdf
This tells pdftk to merge the two pdf files 123.pdf and 456.pdf into a new pdf called 123456.pdf. If you want to merge more than two pdf files at once you simply add them between pdftk and output. You could also use wildcards to merge many or all pdfs with a certain name.
pdftk *.pdf output 123456.pdf
Split pages from one or multiple pdfs:
pdftk A=123.pdf B=456.pdf cat A1-2 B4-5 output 1245.pdf
Repair a pdf:
pdftk 123.pdf output 123fixed.pdf
Merge encrypted pdfs:
pdftk A=123.pdf 456.pdf input_pw A=password cat output 123456.pdf
Pdftk offers several more possibilities which are worth a look if you want to do something that I did not describe on this website. A version for Linux and Windows is available. Here is a quick overview of the most important features:
Instructions for all commands are available on the official program website.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.