Skip to content

a python script to add a simple outline (ie, bookmarks) to a PDF file based on a json spec. Uses pyPdf.

Notifications You must be signed in to change notification settings

psammetichus/PDF-Add-Outline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

If you've ever gotten a PDF that you wished had an outline, then this simple tool can help.

PDF Outlines are bookmarks that act like an interactive table of contents. The spec supports nested outlines, which wouldn't be hard to add, but this tool only does single-level outlines.

The program uses pyPdf, which should be available from your distro's repository; you can also pip install it.

The spec json file is a simple associate array mapping outline titles to (0-indexed) page numbers. If your PDF has PageLabel ranges set (ie, if the PDF reader's stated page number is not the same as the logical page number) then you'll have to allow for this.

Licensed under GPLv3.

About

a python script to add a simple outline (ie, bookmarks) to a PDF file based on a json spec. Uses pyPdf.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages