View Single Post
Old 03-16-2012, 08:35 AM   #1
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,687
Karma: 4392001
Join Date: Dec 2010
Device: Kindle 3
Lightbulb Automatically adding TOC bookmarks from a text file

Originally, I had planned to use a JavaScript script to add missing TOC bookmarks, but then I found a great Open Source Java program that allows TOC boookmarks to be added from a text file: JPdfBookmarks

To use it you'll have to create a bookmarks text file that looks at a bare minimum like this (bookmark title/page number):
Code:
Chapter 1/1
Chapter 2/10
Chapter 3/20
Then all you have to do is:
1. Open the .pdf file with JPdfBookmarks.
2. Click the Load Bookmarks from a text file... button and select your bookmarks text file.
3. Save the .pdf file.

For more information, see the program's Wiki page.

The only downside is that JPdfBookmarks is a bit slow. If you have an older machine or a very large .pdf file, it might take some time until all bookmarks are added.

Last edited by Doitsu; 03-17-2012 at 05:02 AM.
Doitsu is offline   Reply With Quote