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.

Features

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

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

  • allow customizing of 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.1.tar.gz (42.5 kB view details)

Uploaded Source

Built Distribution

pdfnup-0.3.1-py2.5.egg (13.6 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for pdfnup-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6f6366f85432b7790c0194da4ad0eafb33c02584066105fe054c74dd36cbda63
MD5 fb31517f72e23a9ec9c9eb92a7dbda2e
BLAKE2b-256 d2cdccb125b933fe61fcce2ba8a01879f8749b2e4dce91b95125cca050deadd9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pdfnup-0.3.1-py2.5.egg
Algorithm Hash digest
SHA256 4bce036a0b7a12a408f3f4aa9196dee48eb73c18661e3437c8be8fae6721a24c
MD5 3cb3a7f0d4bc5bba8940ac7605febae4
BLAKE2b-256 418ca306202e52fa90c4e0fca7504fcc8b54f29ff4bb4672cb46333167c4b411

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