Merge two pdf files side by side in command line

You can split File1.pdf and File2.pdf into pages and then combine those tmp files into File1+2.pdf like so:

# Split files, note the naming scheme
pdfseparate File1.pdf temp-%04d-file1.pdf
pdfseparate File2.pdf temp-%04d-file2.pdf

# Combine the final pdf
pdfjam temp-*-*.pdf --nup 2x1 --landscape --outfile File1+2.pdf

# Clean up
rm -f temp-*-*.pdf

I would use this:

sudo apt install psutils 
sudo apt install ghostscript

pdf2ps -sOutputFile=input1file%d.ps input1file.pdf input1file.ps # cut to individual pages
pdf2ps -sOutputFile=input2file%d.ps input2file.pdf input2file.ps
psmerge -oinput.ps *.ps # put them together page by page from the alternative files
pstops -p a4 "2:[email protected](21cm,0)[email protected](21cm,14.85cm)" input.ps output.ps # put 2 pages on one
ps2pdf output.ps output.pdf # convert back to pdf

May be you will appreciate that. I like it because it is small and fast, but the man pages need improvement. :-(