I've been looking everywhere (i.e. lots of Google searching) for pdfconcat, which supposedly is very good at merging PDF files together.
Anyone know where I can get this?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
I am the author of pdfconcat. The offical source code download site of pdfconcat is http://pts-mini-gpl.googlecode.com/svn/trunk/pdfconcat/ . Example command-line for cancatenation of
t3.pdf to t.pdf (type it without the
$ in the beginning):
$ pdfconcat -o t.pdf t1.pdf t2.pdf t3.pdf
pdfconcat is now a bit out of date, for example it cannot read PDFs with cross-reference streams or object streams. Since these would be complicated to implement (i.e. it would blow up the source code of pdfconcat by a factor of 10 or more), I don't think they will be implemented in pdfconcat.
As of now I recommend qpdf instead of pdfconcat for PDF concatenation. qpdf can generate small output files (if you use the command-line flags
--stream-data=compress --object-streams=generate; but using
--normalize-content=y will most probably make the output PDF larger). Example command-line with qpdf (version 3.0.0. source code download link) for PDF concatentation (it's deliberate to have the first filename twice):
$ qpdf t1.pdf --pages t1.pdf 1-z t2.pdf 1-z t3.pdf 1-z -- t.pdf
As seen in other answers, you may also try pdftk (also available as an Ubuntu package) instead of pdfconcat for PDF concatenation. I tried pdftk now, and it didn't generate too large output files for me. If you get a very large file size with pdftk (i.e. much larger than the sum of the input sizes), send me your input PDFs (because I'm interested in what's going on). Example command-line with pdftk:
$ pdftk t1.pdf t2.pdf t3.pdf cat output t.pdf
For Unix systems there is the
pdfjoin shell script (part of pdfjam, also available as an Ubuntu package), but it has a very heavy-weight dependency: pdfLaTeX and the pdfpages.sty LaTeX-package).
Please note that none of the concatenation methods above preserve all hyperlinks in the document (especially hyperlinks in a non-first input file). Please do adequate testing if your concatenation method preserves all the interactive PDF features you care about.
A google search on
pdfconcat linux gives Download PDF Concat 0.1 for Linux.
One of the requirements is
pdftk, so I doubt that it will solve your current problem.