Skip to content

aqzlpm11/pdfbookmarker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFBookmarker

Add bookmarks into PDF using PyPDF2

1| Dependencies

To use the scripts here, you must install or download PyPDF2 first.

2| Usage

  1. Make add_bookmarks.py executable:

    $ chmod +x add_bookmarks.py

  2. Turn to your target PDF (e.g. MyBook.pdf), record bookmark titles and page numbers of the PDF into a TEXT file (e.g. my_bookmarks.txt) by hand with the following format:

    ""|

For samples, see sample_bookmarks.txt.

  1. Generate a copy of MyBook.pdf with additional bookmarks specified by my_bookmarks.txt:

    ./add_bookmarks.py MyBook.pdf my_bookmarks.txt

The default filename of the output PDF is MyBook(new).pdf. Of course you can specify the filename explicitly:

./add_bookmarks.py MyBook.pdf my_bookmarks.txt MyBook_with_bookmarks.pdf

About

Add bookmarks into PDF using PyPDF2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%