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

Let us say I want slides.pdf to contain 4 slides per page instead of one.

I can easily open a slides.pdf document under evince (the default Ubuntu document viewer)

evince slides.pdf-->Print-->Page Setup--> Pages per Side --> 4 (or some other number)

Then, I can indicate I want to print to a file, and print. The result is an output.pdf file with the desired number of slides per sheet.

I want to achieve this same functionality through the command line (as I need to incorporate this into a script). All I have found so far are solutions relying on bloated external tools. For example, I tried installing pdfjam (which first required me to install 88.1 MB worth of packages from texlive-latex-base in order to achieve a functionality that I already have!), The result was only failure with pdfjam ERROR: LaTeX package pdfpages.sty is not installed.

I would rather avoid bloated external packages when the functionality I need is definitely available in my system. If I can do it graphically via evince, I should be able to do it programmatically. (I can always write an xdotool script to replicate the actions graphically, but this would be far from elegant).

How do I achieve this via command line?

share|improve this question
up vote 2 down vote accepted

to perform an IMPOSITION, nothing is better than Multivalent.jar (latest free version with tools inside, latest Multivalent build currently hosted on sourceforge - 2009 - has no more pdf tools)

you can download the Multivalent.jar build with tools from:

online man - http://multivalent.sourceforge.net/Tools/pdf/Impose.html

use:

java -cp path...to/Multivalent.jar tool.pdf.Impose -dim (rowsxcols) -paper (paper sizes where pages will be imposed) file.pdf
share|improve this answer
    
Thank you! I have used your solution. It is simple, not bloated, self-contained, cross-platform. Perfect. – user84207 May 15 '13 at 21:47

You can also use pdfnup:

pdfnup --nup 2x2 --no-landscape file.pdf

where 2x2 refers to 2 rows by 2 columns (or the reverse--I'm not sure). See man pdfnup for more options.

share|improve this answer
    
pdfnup works fine. A note for people who want to put the same one page PDF four times on one page: You need to list the input pdf file four times: pdfnup --no-landscape --a4paper --nup 2x2 input.pdf input.pdf input.pdf input.pdf – guettli Dec 20 '14 at 17:16

You must log in to answer this question.

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