How can I merge PDF files with Perl?
Question
Using Perl, how can I combine or merge the sample PDF files into a single PDF file?
Solution
OTHER TIPS
Why do you need to do it from Perl? Chris has already mentioned CAM::PDF.
If you just need to merge them, pdftk (PDF ToolKit) works just fine. It's a simple command line:
pdftk file1.pdf file2.pdf cat output merged.pdf
You can use the GhostScript utility pdf2ps
to convert the PDFs into PostScript files, concatenate the PostScript files, and then use ps2pdf
to convert the result back into a PDF.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow