# Merge multiple small PDFs on A4 size format

I have a PDF file with approximatly 300 pages (A4). On each page some text with lines are plotted, which take up only a third of the page size. So I want to get rid of the white space everywhere. I used the burst command to create for every page a single PDF-file which have no white space on it. Now I need to join these PDFs on A4 papersize. When I use PDFTK I get several pages, which have no whitespace, but when I want to print them, they will be printed out on separate pages. Has someone an idea how to handle this problem??

• What commands did you use exactly? Please copy-paste. If possible, upload a sample document that demonstrates the problem. – Gilles Aug 16 '12 at 21:56

Yqou could also try the script "pdfjoin" and "pdfnup" command line programs from the pdfjam packages.

However, I would include the PDFs in a LaTeX document, and let LaTeX worry about how to fit them best on a page.

First, you need to install LaTeX:

sudo apt-get install pdflatex


Next, create a file "joined.tex" like this:

\documentclass[12pt]{article}
\usepackage{graphicx}
\begin{document}

\includegraphics[width=15cm]{file1.pdf}
\includegraphics[width=15cm]{file2.pdf}
\includegraphics[width=15cm]{file3.pdf}
% ...etc, for each of your pdf files
\end{document}


Finally, run (in a terminal)

pdflatex joined.tex


Hopefully, you will get your file in joined.pdf