Concatenate multiple PDF documents while preserving orientation (portrait/landscape) of each page:
$ gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dAutoRotatePages=/PageByPage -sOutputFile=concatenated.pdf $(ls -v doc*.pdf)
Concatenate multiple PDF documents while preserving orientation (portrait/landscape) of each page:
$ gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dAutoRotatePages=/PageByPage -sOutputFile=concatenated.pdf $(ls -v doc*.pdf)