Allows you to add an outline (or table of contents) to a pdf file. It overwrites existing entries, so its more of a Replacer than an Editor.
./gradlew shadowJar
The jar will be in the build/libs/
folder.
- Read outline entries from a text file
- Specify page labels instead of numbers
- Replace PDF file in-place
- Deduce tree structure of outline from numbering scheme
pdfoutlineeditor.jar [--resolve-page-labels] [--output OUTFILE] INFILE OUTLINEFILE
Example:
$ cat > outline.txt
1 First entry..........6
1.1 Another one........7
2 Chapter 2............9
$ java -jar pdfoutlineeditor.jar my.pdf outline.txt
The outline text file must adhere to the following specification:
- An optional chapter specification consisting of numbers and dots (1, 1.1, 1.1.2 and so on) separated with a single space from
- the description (the actual label of the outline entry) separated with two or more dots from
- the page number. If you specify the
--resolve-page-labels
option, you can also use page numbers as displayed by the PDF viewer, such as roman numerals for the preamble.