alcohol alcohol - 2 years ago 199
Linux Question

Merge / convert multiple PDF files into one PDF

How could I merge / convert multiple PDF files into one large PDF file?

I tried the following, but the content of the target file was not as expected:

convert file1.pdf file2.pdf merged.pdf

I need a very simple/basic command line (CLI) solution. Best would be if I could pipe the output of the merge / convert straight into
( as originally attempted in my previously asked question here: linux piping ( convert -> pdf2ps -> lp) ).

Answer Source

I'm sorry, I managed to find the answer myself using google and a bit of luck : )

For those interested;

I installed the pdftk (pdf toolkit) on our debian server, and using the following command I achieved desired output:

pdftk file1.pdf file2.pdf cat output -

This in turn can be piped directly into pdf2ps. Replace the dash (-) with the filename where you want the output to be saved.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download