Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Merge multiple PDF files into one output file UNIX
I needed to merge (concatenate) some PDF files and couldn't find any applications for OS X. Acrobat surely does it, but is very expensive to buy for just one single merge. Office v.X can include PDFs and print the whole document in PDF, but the output was very large and in poor resolution ... and so on.

Finally I tried pdflatex and it worked great! Just create a little .tex script that uses /includegraphics{file1.pdf} for every single page, and the output file is small and in very good resolution.

[Editor's note: The above is exactly what was submitted by the anonymous contributor, and I couldn't ask any clarifying questions as he/she did not include their email address. Based on some web research on my part, it appears that you'll need to install TeXLive-teTeX in order to get pdflatex. However, I haven't tested this out by actually installing the package myself, so you're on your own on this one -- but I thought the hint interesting enough to merit posting anyway.]
    •    
  • Currently 3.57 / 5
  You rated: 3 / 5 (7 votes cast)
 
[49,709 views]  

Merge multiple PDF files into one output file | 10 comments | Create New Account
Click here to return to the 'Merge multiple PDF files into one output file' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Re:Merge multiple PDF files into one output file
Authored by: vojou on Jul 14, '02 11:30:42AM

I found an (easier ?) alternative way on http://www.masda.vxu.se/~pku/MacOSX_TeX/:


> Sometimes ago, I read two messages with solutions about merging pdf files:
> In command line:

> texexec --pdfarrange --result all.pdf file1.pdf file2.pdf file3.pdf
> texexec --pdfarrange --result all.pdf `ls *.pdf`



[ Reply to This | # ]
pdftex is a fink package
Authored by: urcindalo on Jul 15, '02 07:56:47AM

pdftex is also a fink package, so you can install it with "fink install pdftex" or "sudo apt-get install pdftex" if you don't want to go through the compilation process.



[ Reply to This | # ]
Also get iMacTeX
Authored by: herbs on Jul 15, '02 07:53:05PM

It will allow you to write those short .tex files and run pdftex with no problem at all.

Good Luck,
Herb Schulz



[ Reply to This | # ]
It works for me
Authored by: Giel on Dec 09, '02 02:29:40PM

It actually works! I tried it with two pdf files called \'one.pdf\' and \'two.pdf\'.
This is a simple file I used to test:

\\documentclass[11pt]{article}
\\usepackage{graphicx}
\\begin{document}
\\includegraphics{one}
\\includegraphics{two.pdf}
\\end{document}



[ Reply to This | # ]
It works for me
Authored by: Giel on Dec 09, '02 02:33:05PM

In my example something went wrong with the html.
So use single backslashes!



[ Reply to This | # ]
Merge multiple PDF files into one output file
Authored by: bigrat on Apr 14, '03 03:07:38PM

Couldn't you just use the cat command in terminal.app?

"cat folder/* somefile.pdf"



[ Reply to This | # ]
Merge multiple PDF files into one output file
Authored by: miknight on Apr 19, '06 09:34:15PM

Unfortunately not. I think the PDF file format specifies details in the header of the file for things like how long the PDF is, how large, how many pages, etc. Out of curiousity I tried it anyway and found that in the combined PDF file only the first PDF document was visible.



[ Reply to This | # ]
Merge multiple PDF files into one output file
Authored by: cekim on Mar 31, '08 10:53:29AM
Merge multiple PDF files into one output file
Authored by: tjj on Mar 31, '08 02:34:14PM

Preview...
allowed me to drag one pdf into the sidebar of another, creating a two-page pdf from two one-page pdfs.



[ Reply to This | # ]
Merge multiple PDF files into one output file
Authored by: amoscowdog on Nov 27, '10 09:34:14PM

Hi,

Here's a video on Youtube that I posted a few days ago and shows you amongst other things how to concatenate a number of pdf files using Pdftk. It also describes how to convert a double page spread to a single page pdf by cropping and saving each half, splitting the pages and concatenating them using Ghostscript and Pdftk.

Video: http://www.youtube.com/watch?v=QZp31pu1EWU

regards,

Tony



[ Reply to This | # ]