Command line utility pdftk is used to create pdfs.
pdftk
Install:
sudo apt instal pdftk
Use:
pdftk page1.pdf page2.pdf output mergedfile.pdf