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?

  • 1
    First part of question is solved - I used: pdf2ps input.pdf - | psnup -pA4 -4 | ps2pdfwr - >> output.pdf How about second part? I still convert pdf to ps and than again back... Can this be optimisied? – smihael Nov 24 '12 at 16:21

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

  • thanks! that's much better as it already comes as dependency of other pdf applications and it's even installed in our school computer pools :) – smihael Nov 26 '12 at 19:10
  • I'm glad I could help! – Thomas W. Nov 26 '12 at 19:26
  • 4
    For anyone wondering - the resulting command is: pdfnup --nup 2x2 --suffix '2x2' Dokumente/input.pdf – smihael Nov 29 '12 at 9:23

I love pdftk, a quick search on google will lead you to it. There is a cmdline for linux, and a gui for windows and a usb portable version for windows. Pretty slick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.