I use LaTeX for virtually all written documents I produce. It is a necessity when writing academic papers in computer science journals and conferences. But I also use it to format my CV, to write recommendation letters for students, among many other things. It is ideal for any writing that involves formatting mathematics, and it greatly simplifies bibliography generation. Occasionally, it is necessary to produce a single pdf from a combination of documents, some of which may be beyond my control, or may be in a format that I cannot easily embed within another. For example, perhaps I need to include an appendix written by someone else in something horrid like Microsoft Word. The solution is to convert each document to a pdf, as a common format, and then combine into a single file. LaTeX is natively compiled into pdf, and just about any other format can generally convert to pdf without much difficulty.
So you have multiple pdf files that you want to combine into one, but you don't have a version of Acrobat that will do this. Here's an easy way to combine multiple pdf files using pdfLaTeX. If you don't use LaTeX, don't worry about it. You don't really need to know LaTeX to use this trick, and I have a repository on GitHub with a LaTeX file you can edit with the details of the pdfs you want to combine. It doesn't matter how the original pdf files were produced.
Here are the steps to combining multiple pdfs using pdfLaTeX.
Step 0: Install a LaTeX Distribution
If you don't have LaTeX installed on your system already, then you'll need to begin by installing a LaTeX distribution. For example, TeX Live is a good choice.
Step 1: Create a LaTex Source File
Create a LaTeX source file with a tex extension and named how you want the final pdf named (other than extension). For example, if you want your pdf named combined.pdf, then name your tex file combined.tex. It will save you from renaming files later.
In that combined.tex file (or whatever you named it), add the following with your favorite text editor.
\documentclass[11pt,letterpaper]{article}\usepackage[final]{pdfpages}\begin{document}% The following lines are the only ones you need to edit.\includepdf[pages=-]{file1.pdf}\includepdf[pages=-]{file2.pdf}\includepdf[pages=-]{file3.pdf}\end{document}
The above example combines three pdf files file1.pdf, file2.pdf, and file3.pdf in their entirety and in that order. Simply edit these lines with the names of your pdf files.
A statement like: \includepdf[pages=-]{file1.pdf} will add the entire contents of file1.pdf to the pdf that results. If you want to include only part of one of the files, you can specify a page range. For example, perhaps you want all of file1.pdf, but only pages 3 to 7 of file2.pdf, and then all of file3.pdf. You can accomplish something like that with the following.
\documentclass[11pt,letterpaper]{article}\usepackage[final]{pdfpages}\begin{document}% The following lines are the only ones you need to edit.\includepdf[pages=-]{file1.pdf}\includepdf[pages=3-7]{file2.pdf}\includepdf[pages=-]{file3.pdf}\end{document}
Step 2: Run pdfLaTeX.
You can now use pdfLaTeX to combine the pdfs. At the command line, in the directory containing the LaTeX source file you created above and your existing pdfs, run the following (change the combined.tex file to whatever filename you used above):
pdflatex combined.tex
This will produce a pdf named combined.pdf.
GitHub Repository
I have a GitHub repository with a LaTeX file that you can download and edit with the details of your pdfs to get you started.
Edit the lines in that file where indicated with the names of the pdfs you want
to combine in the order you want them to appear in the result, including specifying
page ranges if you don't want the entire pdf files.
Run pdflatex CombinePDFs.tex at the command line, which will produce a file named CombinePDFs.pdf.
You can then rename the pdf file, or alternatively, you can name the tex file as
desired before you begin.
Vincent A. Cicirello - Professor of Computer Science at Stockton University - is a
researcher in artificial intelligence, evolutionary computation, swarm intelligence,
and computational intelligence, with a Ph.D. in Robotics from Carnegie Mellon
University. He is an ACM Senior Member, IEEE Senior Member, AAAI Life Member,
EAI Distinguished Member, and SIAM Member.