[ALUG] Reformatting a PDF

Mark Rogers mark at more-solutions.co.uk
Wed May 17 15:19:22 BST 2017

On 17 May 2017 at 14:35, Brett Parker <iDunno at sommitrealweird.co.uk> wrote:
> The pages happen to be 1/3rd A4 size, so, something like:
>   pdfjam Royal-Mail-Our-Prices-March-2017_0.pdf --a4paper --landscape --nup 3x1 --outfile ~/test.pdf
> Should do what you're after.

That's damn near perfect, thanks!

The only tweak I needed was that the original contains 16 pages, with
the last page being useless but preventing it fitting on 5 pages.

Googling suggested that
$ pdfjam Royal-Mail-Our-Prices-March-2017_0.pdf 1-15 --a4paper
--landscape --nup 3x1 --outfile ~/test.pdf

.. would do what I wanted but it didn't - the result wasn't a valid
PDF. So I tried two steps:
$ pdfjam Royal-Mail-Our-Prices-March-2017_0.pdf 1-15 --outfile ~/test.pdf
$ pdfjam ~/test.pdf --a4paper --landscape --nup 3x1 --outfile ~/test2.pdf

.. which extracted the right pages but screwed up the layout.

In the end I combined knowledge from elsewhere in this thread to get:
$ pdftk Royal-Mail-Our-Prices-March-2017_0.pdf cat 1-15 output tmp.pdf
$ pdfjam tmp.pdf --a4paper --landscape --nup 3x1 --outfile result.pdf

The result is spot on but I'd be interested to know where I went wrong
trying to do this in a single step with pdfjam?

Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450
Registered in England (0456 0902) 21 Drakes Mews, Milton Keynes, MK8 0ER

More information about the main mailing list