I am trying to write a bash script to merge all pdf files of a directory into one single pdf file. The command pdfunite *.pdf output.pdf successfully achieves this
pdfunite *.pdf output.pdf
You can rename your documents i.e. 001.pdf 002.pdf and so on.