Skip to main content

Automatically generate and edit PDF table of contents / outline

Project description

PDF Auto Outline

Automatically generate and embed a table of contents or outline in a PDF.

Install: python -m pip install pdf-auto-outline

Suggestions and contributions are welcome.

Usage

usage: pdfao [-h] [-s] [-o <path>] [-mp <n>] [-e] [-se] [-i <file>] [-t <n>] [--sioyek <path>] [--version] filename

positional arguments:
  filename              input pdf

options:
  -h, --help            show this help message and exit
  -s, --straight        write toc straight to pdf; skip editing
  -o, --out <path>      write changes to new pdf
  -mp, --multiprocess <n>
                        spread job over n processes (faster on Linux)
  -e, --edit            edit pdf toc
  -se, --superedit      edit pdf toc (more attibutes available)
  -i, --infile <file>   write toc from file to pdf
  -t, --tablevel <n>    tab = n toc nesting levels (default 2)
  --sioyek <path>       for users of the Sioyek pdf viewer
  --version             show program's version number and exit

Examples

Generate toc and edit before saving: pdfao paper.pdf

Generate and save to new pdf: pdfao paper.pdf -o new.pdf

Edit exiting pdf toc: pdfao paper.pdf -e

A save toc to new pdf from file: pdfao paper.pdf -o new.pdf -i outline.txt

For Sioyek Users

Example commands; add to prefs_user.config.

new_command _gen_toc pdfao "%{file_path}" --sioyek path/to/sioyek -mp 4
new_command _edit_toc pdfao path/to/pdfao.py "%{file_path}" --sioyek path/to/sioyek -e

If you don't wish to install from PyPI, download source and use python3 -m path/to/src/pdf_auto_outline in place of pdfao.

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

pdf_auto_outline-0.1.3.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

pdf_auto_outline-0.1.3-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file pdf_auto_outline-0.1.3.tar.gz.

File metadata

  • Download URL: pdf_auto_outline-0.1.3.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for pdf_auto_outline-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e6c207716f121e353ed3abd46b2f6f8efb71cf9ab95d147c2713163ee711bb7f
MD5 2156a140336e7aa080d66e01d87b7e88
BLAKE2b-256 9e1461799a0a6997b8be2e9246c31ffe69895d177c8ca22d916f138269dc27b4

See more details on using hashes here.

File details

Details for the file pdf_auto_outline-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pdf_auto_outline-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7f26a14ae0eeb00d2c6d32bb1adafaa5556e29922e546ad43cc7483866c4a7c5
MD5 60ea30fc38c4cb605537a8413647981c
BLAKE2b-256 8201f3909609575626b52c4be896f05e2a7b3d8dcb8e6771cab5a4702cd14475

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