Skip to main content

Layout multiple pages per sheet of a PDF document.

Project description

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!

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

  • 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)
written: file-8up.pdf
>>> generateNup("file.pdf", 8, dirs="LD")
written: file-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 file.pdf
written: file-4up.pdf
$ pdfnup -n 8 file.pdf
written: file-8up.pdf
$ pdfnup -n 8 -l LD file.pdf
written: file-8up.pdf
$ pdfnup -n 9 /path/file[12].pdf
written: /path/file1-9up.pdf
written: /path/file2-9up.pdf
$ pdfnup -n 8 -o "%(dirname)s/foo.pdf" /path/file.pdf
written: /path/foo.pdf

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdfnup-0.3.2.tar.gz (42.2 kB view details)

Uploaded Source

Built Distributions

pdfnup-0.3.2-py2.6.egg (12.9 kB view details)

Uploaded Source

pdfnup-0.3.2-py2.5.egg (12.9 kB view details)

Uploaded Source

File details

Details for the file pdfnup-0.3.2.tar.gz.

File metadata

  • Download URL: pdfnup-0.3.2.tar.gz
  • Upload date:
  • Size: 42.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pdfnup-0.3.2.tar.gz
Algorithm Hash digest
SHA256 03257cec72f242151b8a8907aaa1183bf010a5bce7ff8ee76a5ddf4970daf809
MD5 b5b49f96ccb022c92c5bec630b5ec658
BLAKE2b-256 3c8befe2fd051c5fb11e1da566a108295629e45153a52a9c1fa6f3411f3f90c1

See more details on using hashes here.

File details

Details for the file pdfnup-0.3.2-py2.6.egg.

File metadata

  • Download URL: pdfnup-0.3.2-py2.6.egg
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pdfnup-0.3.2-py2.6.egg
Algorithm Hash digest
SHA256 3d5575d9770202da4b32fbe7f78ac7edbd87c2ba26304c4960eecab70c142c6d
MD5 c1be62847c2301596d089a38ccd1003f
BLAKE2b-256 bd98b16cc7c1288e5f1f0b1f0418d7100fca9c0e17a4de58276e04042a2fbdef

See more details on using hashes here.

File details

Details for the file pdfnup-0.3.2-py2.5.egg.

File metadata

  • Download URL: pdfnup-0.3.2-py2.5.egg
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pdfnup-0.3.2-py2.5.egg
Algorithm Hash digest
SHA256 4a21aff09a57843d03b993dde92acbc3bf3d759fb540fe879d4e16184513129b
MD5 8caa040184f8bd5b0a814ebe8215726a
BLAKE2b-256 cebcfc7cadb89e7f7d506e2eecbccaa89081089e67770daadeda595090d50ab4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page