Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use the following ghostscript commands

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

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?

share|improve this question
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
up vote 6 down vote accepted

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

share|improve this answer
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
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.

share|improve this answer
thanks... i'll have a look on it :) – smihael Nov 25 '12 at 22:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .