Skip to main content

Pdfnup is a Python module and command-line tool for layouting multiple pages per sheet of a PDF document. Using it you can take a PDF document and create a new PDF document from it where each page contains a number of minimized pages from the original PDF file.

Right now pdfnup should be used on documents with all pages the same size, and half square page numbers per sheet work best on paper sizes of the ISO A series.

Basically, pdfnup wrapps pyPdf, a package written by Mathieu Fenniak, which does not provide tools like this for using the core functionality easily from the command-line or from a Python module. Pdfnup itself was much inspired from some code written by Henning von Bargen - thanks, Henning!

This release fixes a rotation buglet, adds a verbose option and allows file objects for input documents.

Features

  • save minimized pages of a given PDF document in a new PDF document

  • place n pages per sheet, with n being square or half square

  • customize layout order, both horizontally and vertically

  • turn rotated pages to make them all have the same format

  • allow patterns for output files

  • install a Python module named pdfnup.py

  • install a Python command-line script named pdfnup

  • provide a Unittest test suite

Examples

You can use pdfnup as a Python module e.g. like in the following interactive Python session:

>>> from pdfnup import generateNup
>>>
>>> generateNup("file.pdf", 8, verbose=True)
written: file-8up.pdf
>>>
>>> generateNup("file.pdf", 8, dirs="LD", verbose=True)
written: file-8up.pdf
>>>
>>> f = open("file.pdf")
>>> generateNup(f, 8, outputPat="out-%(n)dup.pdf", verbose=True)
written: out-8up.pdf

In addition there is a script named pdfnup, which can be used more easily from the system command-line like this (you can see many more examples when typing pdfnup -h on the command-line):

$ pdfnup -V file.pdf
written: file-4up.pdf
$ pdfnup -V -n 8 file.pdf
written: file-8up.pdf
$ pdfnup -V -n 8 -l LD file.pdf
written: file-8up.pdf
$ pdfnup -V -n 9 /path/file[12].pdf
written: /path/file1-9up.pdf
written: /path/file2-9up.pdf
$ pdfnup -V -n 8 -o "%(dirname)s/foo.pdf" /path/file.pdf
written: /path/foo.pdf

Metadata

Release files for pdfnup 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdfnup 0.3.4
File Size Uploaded
pdfnup-0.3.4.tar.gz 55.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pdfnup 0.3.4
File Interpreter ABI Platform
pdfnup-0.3.4-py2.6.egg Legacy Egg format - - Details
pdfnup-0.3.4-py2.5.egg Legacy Egg format - - Details

Total release size: 83.5 kB

Release files / pdfnup-0.3.4.tar.gz

Download URL pdfnup-0.3.4.tar.gz
Size 55.5 kB
Tags Source
SHA-256 checksum
How to use checksums
10cee6ba115bf67ed90e3a556d0df1aade79909938516dcd230dacfa9f2206b9
BLAKE2b-256 checksum
How to use checksums
6a49cddd698cb9e47c2a882b28be2bd27c86bc7e1eda895dbc0edeb0ab24bb5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pdfnup-0.3.4-py2.6.egg

Download URL pdfnup-0.3.4-py2.6.egg
Size 14.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
f06e29d01d7e4eff516cc1b0e18a4b57394217fc1fdafd2f446b719ab279fc34
BLAKE2b-256 checksum
How to use checksums
8fae1663278fdeb62f65a5b6637a90506df6be16bc7df72f743df2afb148e77b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pdfnup-0.3.4-py2.5.egg

Download URL pdfnup-0.3.4-py2.5.egg
Size 14.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
4d57a054d0dee8360cb65532d9226c5fbc5c41d02bbbd1a12b192982d02d65d0
BLAKE2b-256 checksum
How to use checksums
be047a6d103554a6f4260dd3385841fd79761cec11a0fa5af233749260366ac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.4.2

0.4.1

3 release files

0.4.0

3 release files

This release

0.3.4 This release

3 release files

0.3.3

3 release files

0.3.2

3 release files

0.3.1

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page