TransWikia.com

How to properly put two pages onto one using pdfjam?

TeX - LaTeX Asked by pixel on June 2, 2021

I usually want to include two pages onto one in landscape format for printing, and I use pdfjam for that. However, what I notice is that it leaves a lot of empty white-space above and below, and it kind of squeezes the pages. For example, let’s take the following PDF file: https://eprint.iacr.org/2019/224.pdf

Now, if I run the following command, the produced PDF has a lot of empty space:

pdfjam 2019-224.pdf --nup 2x1 --suffix 2up --landscape --outfile temp.pdf

How can I make sure that the empty spaces above and below are minimized? I want to make sure that it uses most of the page instead of leaving unnecessarily a lot of margin.

2 Answers

To understand what's going on here , just add option --frame true (just for testing). E.g:

pdfjam 2019-224.pdf --nup 2x1 --suffix 2up --landscape --frame true --outfile temp.pdf

enter image description here

Now you see that the top and bottom margins are due to the width of the original PDF.

What you can do is to trim the left and right margins of the original PDF by using the --trim option. E.g.:

pdfjam 2019-224.pdf --nup 2x1 --suffix 2up --landscape --frame true --trim '15mm 0mm 15mm 0mm' --outfile temp.pdf

enter image description here

Correct answer by Andreas Matthias on June 2, 2021

You could use pdfcrop first, e.g.,

$ pdfcrop 2019-224.pdf
PDFCROP 1.40, 2020/06/06 - Copyright (c) 2002-2020 by Heiko Oberdiek, Oberdiek Package Support Group.
==> 42 pages written on `2019-224-crop.pdf'.
$ pdfjam 2019-224-crop.pdf --nup 2x1 --suffix 2up --landscape --outfile temp.pdf

Answered by David Purton on June 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP