Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I combine two PDF pages show up on the same page? [closed]

I am looking for a free tool that allows re-arranging pages of a PDF document and combining multiple pages per sheet. The first part (re-arranging) is easily solved by many tools (I use PyPDF).

The problem is with the second requirement: to combine two (or more) pages into single page. For example, take two pages (A and B), rotate them, scale and combine into a single page like this

------       ------            ------ |     |      |      |          |     | |  A  |      |  B   |          | a   | |     |      |      |          |     | |     |      |      |  --->    ------ |     |      |      |          |     |         |     |      |      |          | b   |         |     |      |      |          |     |         ------       ------            ------ 

The solution needs to work on Linux and preferably on Windows too. I'm looking for either console application or library with Python or Perl bindings.

Edit there is pdfnup library that is supposed to perform exactly this kind of transformation, and is cross-platform, however I cannot use it due to a bug similar to this.

like image 530
Boris Gorelik Avatar asked Feb 11 '09 07:02

Boris Gorelik


People also ask

How do you make all pages in a combined PDF the same size?

You have to use the Print to a New PDF option using the PDF printer. Once in the dialog box, set the page scaling to 100% and set your page size. Once you do that, your new PDF will be uniform in page sizes.

How do I get PDFs to show next to each other?

Viewing pages side-by-side lets you display more of a document on the screen. To view two pages side-by-side, choose PDF > PDF Display > Two Pages or PDF > PDF Display > Two Pages Continuous. If you want the first page to be a right-hand page, as it would be in a book, choose PDF > PDF Display > Book Mode.


1 Answers

This is a summary of the tools I found for PDF (I wanted to find the equivalent of psup and psbook)

  • Create booklets: pdfbook, pdf-tools (command: pdfbklt)
  • Merge PDF files: pdfmerge, pdfjam (command: pdfjoin)
  • Rotate pages: pdfjam (command: pdf90)
  • Multiple pages per sheet: pdfjam (command: pdfnup)
  • Create posters (multiple sheets per page): pdfposter

From my package manager:

  • pdf-tools: http://search.cpan.org/dist/Text-PDF
  • pdfbook: http://www.ctan.org/tex-archive/support/pdfbook/
  • pdfmerge: https://github.com/dmaphy/pdfmerge
  • pdfjam: http://go.warwick.ac.uk/pdfjam
  • pdfposter: http://pdfposter.origo.ethz.ch/

Create an A6 booklet:

pdfbook -2 -p a5 infile.pdf outfile.pdf 

pdf-tools contains:

  • pdfbklt: create booklets
  • pdfrevert: Removes one layer of changes to a PDF file, trying to maximise the size of the output file (to account for linearised PDF).
  • pdfstamp: Adds the given string to the infile .pdf file at the given location, font and size.

There is also multivalent: http://multivalent.sourceforge.net/Tools/index.html

like image 189
Mildred Avatar answered Sep 24 '22 22:09

Mildred