I have 250 pdf files in one folder that I want to merge in one document. The order does not matter. Is there a simple way of doing it?
I can use PDF-Shuffler as suggested here but the progam hangs for 10 minutes befor it has loaded all the pdfs.
Can I achive this maybe with an inline command like
pdftk *.pdf output mergedfiles.pdf?
25 Answers
I would use pdfunite. It is nice and simple. cd to your directory. Then use something like this:
pdfunite *.pdf all.pdf(Before running, make sure you don't already have a file called all.pdf in that directory.)
Thanks to steeldriver who showed me that this is doing the job:
pdftk *.pdf cat output mergedfiles.pdf 1 You can use qpdf as pdftk is not available in Ubuntu Bionic:
qpdf --empty --pages *.pdf -- out.pdf 1 sudo apt-get install gsgs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=target.pdf -dBATCH xx.pdf xx.pdf xx.pdf ...- you can get all filenames through
ls -l *.pdf | awkcommand
Wish it helps . ^_^
1You can use pdftools:
pdftools --input-dir dir_with_pdfs --output output.pdf