Produce PDF with 2 pages per sheet from a PDF with 1 page per sheet from the cli

2 réponses [Dernière contribution]
Staircase
Hors ligne
A rejoint: 02/24/2022

I am looking for a cli utility that can produce a PDF with 2 pages per sheet from a PDF with 1 page per sheet; something like that:

$ pdfjam input.pdf -o output.pdf --nup 2x1 --landscape

None of the utilities commonly mentioned on the web seem to be available in our repository: pdfjam, pdfnup, pdfpun, psnup, pdfbook.

$ apt list pdfjam pdfnup pdfpun psnup pdfbook
Listing... Done

I looked at the man pages and help output of qpdf and pdftk (which we can download from the repository) but they don't seem to have a straightforward option to produce a PDF with 2 pages per sheet from a PDF with 1 page per sheet.

Finally, I found boomaga. It does the job but it requires usage of a GUI.

Do you know of a cli utility which can produce a PDF with 2 pages per sheet from a PDF with 1 page per sheet?

Avron

I am a translator!

Hors ligne
A rejoint: 08/18/2020

If you install the texlive-extra-utils package (it installs many things), you can use the pdfxup command:

pdfxup -x 2 -o <output file name> <input file name>

Staircase
Hors ligne
A rejoint: 02/24/2022

Thank you, Avron.

(I also noticed that pdfjam is included in texlive-extra-utils).