Skip to main content

A tool to rearrange PDF pages for printing booklets

Project description

Rearrange PDF

A Python tool to rearrange PDF pages for printing booklets.

Installation

pip install rearrange-pdf

Usage

Command Line

# Rearrange PDF with 4 slides per page (default)
rearrange-pdf your_document.pdf

# Rearrange PDF with 2 slides per page
rearrange-pdf your_document.pdf --per-page 2

Python API

from rearrange_pdf import rearrange_pages

# Rearrange with 4 slides per page
new_pdf = rearrange_pages("your_document.pdf", per_page=4)

# Rearrange with 2 slides per page
new_pdf = rearrange_pages("your_document.pdf", per_page=2)

How it works

This tool rearranges PDF pages to create a booklet layout:

  • For 4 slides per page: Pages are rearranged in the order [0, 2, 4, 6, 3, 1, 7, 5]
  • For 2 slides per page: Pages are rearranged in the order [0, 2, 1, 3]

If the total number of pages is not divisible by the group size (8 for 4-per-page, 4 for 2-per-page), blank pages are added to complete the group.

License

MIT

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

rearrange_pdf-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rearrange_pdf-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file rearrange_pdf-0.1.0.tar.gz.

File metadata

  • Download URL: rearrange_pdf-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for rearrange_pdf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5301221044706c74d6ecf60363c027fffa7bb0ef33178adea553e65b5dc21fe4
MD5 99de029d7450f3c160e29c4bf7126209
BLAKE2b-256 2bce484158e2ec29bdeb0fc6147c17f734e69b0d457aa7b19874c0cc1d2fcf3d

See more details on using hashes here.

File details

Details for the file rearrange_pdf-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rearrange_pdf-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for rearrange_pdf-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38df0f75b9f5c5fcac0198fb79bec6ffec8e95f0401e4ba3b72d17854dd7748c
MD5 8dd8b42577038f80de7cfeaf29505e53
BLAKE2b-256 0bebace99660992b262553ed7c9cd60196de49d50caec56f2724a36060ff51f2

See more details on using hashes here.

Supported by

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