Tuesday, March 8, 2016

How to merge pdf pages horizontally in Ubuntu using pdfjam

To merge single-page pdf files horizontally, you can use pdfjam command line tool in Ubuntu:

1. Install pdfjam:

$ sudo apt-get install pdfjam

2. Merge page1.pdf and page2.pdf (all are single page pdf files) horizontally:

$ pdfjam page1.pdf page2.pdf --papersize '{21cm,29.7cm}' --nup 2x1 --landscape --outfile myoutput.pdf

page1.pdf will be on the left, and page2.pdf will be on the right side of the output pdf file.

Pretty neat!!!