Combining PDF files
Combining the source code of two LaTeX documents can be pretty challenging, especially if they are based on different classes. However, combining their PDF output is pretty straightforward.
How to do it...
We will use the pdfpages package.
We can test it with the flyer example from the first chapter together with the form example of the current chapter. Let’s get going:
- Start a document and choose any class:
\documentclass{article}
- Load the pdfpages package:
\usepackage{pdfpages}
- Begin the document:
\begin{document}
- Include the first PDF file using the \includepdf command. It takes a page range as an option. Use a dash (-) for the entire page range:
\includepdf[pages=-]{flyer}
- Include the second PDF file:
\includepdf[pages=-]{form}
- End the document:
\end{document}
- Compile once, and look at the newly generated file containing the flyer and the form.
How it works...
The pdfpages package is primarily for including...