5

I want to combine two pages in pdf file into single page.

Consider I have a pdf file in which there are two pages, now I want to combine two pages into (single) one, No-matter for (how-long) page-size!

How to do that?

Note: This question is not about combine two pdf files or merging pdf files or adding pages in pdf files.

Also visit Question about scaling page in pdf.

8 Answers 8

4

PDFJam (Not a GUI app)

Multiple pages can be combined with it.

sudo apt-get install pdfjam

Then you need to use the pdfnup command to combine pages:

pdfnup -2 [INPUT].pdf [OUTPUT].pdf

This will combine two input pages per one output page.

Refer to man pdfnup for more details.

Also refer this Stackoverflow question.

0
3

If you're looking for an OpenSource solution I highly recommend to look at PDFsam, which comes with a huge pack of useful features to merge, split and "alternate mix" PDF files.

enter image description here

Here's a brief guide explaining what it can do, with a strong focus on the Alternate Mix feature which is one of its major strenghts.

1

Sejda is an online service based on an open source PDF engine and the N-Up feature should do what you are asking.

1

For ubuntu 18.04 i installed texlive-extra-utils (which contains pdfjam)

sudo apt install texlive-extra-utils

and then for 2 pages:

pdfnup --batch --suffix 2up my_pdf_file.pdf

or for 4pages in table 2x2 format:

pdfjam my_pdf_file.pdf --no-landscape --frame true --nup 2x2 --suffix 4up  --outfile ~/Desktop/
1
  • pdfjam still works on Ubuntu 20.04. Thanks
    – gkephorus
    Jun 8, 2022 at 21:02
0

PDF-Shuffler is a GUI PDF app that allows you to merge, shuffle and delete PDF pages.

Install with;

Sudo apt-get install pdfshuffler

Good luck.

2
  • 4
    Unfortunately this is only good for simple reordering of pages and merging documents. The question appears to be about merging pages within a single document.
    – Oli
    Jul 21, 2014 at 11:19
  • Now it is apt install pdfarranger Sep 24, 2022 at 17:57
0

There is no need to install additional software.

Use the Print to PDF feature of your favourite pdf viewer.

For example: Open your pdf file evince and print with two pages to one side, select Print to PDF or a pdf printer that is installed on your system.

0

You can use pdftools with the --nup option:

pdftools.py  --input-file input.pdf --output output.pdf --nup 2 1

This will generate an output pdf file where a page of the output file is the combination of two pages of the input file, up and down.

If you want to combine them left and right, just switch the parameters of the --nup option:

pdftools.py  --input-file input.pdf --output output.pdf --nup 1 2
-2

You can use ghostscript to combine various pdf documents into one, using the following command in terminal:

assuming we have two pdf documents named doc1.pdf and doc2.pdf and we want to combine them into a newly document named combined.pdf

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combined.pdf -dBATCH doc1.pdf doc2.pdf

or for all files in directory

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combined.pdf -dBATCH *.pdf

You must log in to answer this question.

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