Skip to main content

A command line tool for adding an outline to pdf files

Project description

pdfoutline

A command line tool for adding an outline (a bookmark, or table of contents) to pdf files.

Prerequisites

Make sure you have ghostscript installed.

# Mac
brew install ghostscript

# Debian, Ubuntu
sudo apt install ghostscript

ghostscript for windows can be installed from the official website

Usage

$ pip install pdfoutline
...

$ pdfoutline sample.pdf sample.toc sample-out.pdf
 |██████████████████████----------------------------| 118/263

optionally, the ghost script executable can be specified as well

pdfoutline sample.pdf sample.toc sample-out.pdf --gs_path 'C:\Program Files\gs\gs9.55.0\bin\gswin64.exe'

Demo

demo

Sample output:

sample

Sample Table of contents file: sample.toc

# this is a comment
First Chapter 1
    first section 1
        first subsection 1
    second section 4
    third section 5

# a command to fix a gap between pdf pages and content pages
+10

Second Chapter 10
    some entry 10
    some entry 11

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

pdfoutline-0.0.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

pdfoutline-0.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file pdfoutline-0.0.0.tar.gz.

File metadata

  • Download URL: pdfoutline-0.0.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pdfoutline-0.0.0.tar.gz
Algorithm Hash digest
SHA256 32f63cbbd492e261ebc57c2cd9cb74f6f5d93b12309c2e9599c9d211cb8ac7da
MD5 6c0feb269d6debd8a88b4a71e0dbc937
BLAKE2b-256 f90fe85bce3b2337209ecc58fbcc6bdb9ad0c594727684ba94cd364ac53daf39

See more details on using hashes here.

File details

Details for the file pdfoutline-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: pdfoutline-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pdfoutline-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07195a870bb9100123ebf5f2781e5b9a0e4d1675b77a6abd8faeba8cdbd94fbf
MD5 10088232e35ef474df7456d27d5da999
BLAKE2b-256 3100e1038a7d1165142492fbcd5adf86b5411c8f22fa0aa45c95f2b904b2f8c1

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