Multiple pages per sheet (PDF)

ghostscriptpdfps

I use the following ghostscript commands

pdf2ps input.pdf - | psnup -pA4 -4 >> output.ps
ps2pdf output.ps output.pdf
rm output.ps

to merge multiple pages (in this case 4) from input file to one sheet in outupt file.

How can I modify pipelining so that I won't have to use 2 commands, but just a single one liner? Is there any other commandline tool that would do the same and can work directly on pdf files?

Best Answer

There is PDFjam that brings pdfnup and allows you to do basically the same things as psnup.