Home > latex > Merge PDF files and start each on the right side (on an add page)

## Merge PDF files and start each on the right side (on an add page)

Problem
I had several small PDF files that I wanted to print in one shot. With pdftk you can concatenate them easily but I wanted to see each document to start on an odd page, i.e. on the right side. How to do that?

Solution
A hackish solution is to use pdftk. Check the number of pages and if it’s odd, insert a blank page. Then merge ’em all.

A better way is to leave the job for LaTeX:

\documentclass[a4paper]{article}
\usepackage{pdfpages}

\begin{document}

\includepdf[pages={-}, openright]{01.pdf}
\includepdf[pages={-}, openright]{02.pdf}
\includepdf[pages={-}, openright]{03.pdf}
%...

\end{document}


Compile the source with “pdflatex”. Warning! The part “pages={-}” means to insert the whole PDF, from start to end. If you forget that, it’ll insert just the 1st page of a PDF.

Tip from here and here.