
Runs on MacOS without any other installations. Here's the python method for adding Bookmarks to the Table of Contents.
Bookmark pdf online for mac os#
HINT : One of the other methods will be to use pdftk which IS available for Mac OS X!
Bookmark pdf online how to#
I'll add one or two other methods to insert bookmarks on the command line too, later or in the next few days, if I have more time.įor now this one has to do, because I never showed it here on SO, AFAICR.īut I thought because you gave the background "I'm merging 1-page PDFs, and it is slow now I want to add bookmarks too.", I could show how to do it with one single method. Note: LaTeX is available for OSX via two methods: The resulting file will have the bookmarks, looking like this in Preview.app: Save the template with the inserted lines, then run the following command twice: pdflatex template.tex You start with an empty LaTeX template like the following one: \documentclass

Now run this command: gs -o bookmarked.pdf \ Name this file for example: addmybookmarks.txt 2. Title (Bookmark for page 14) /OUT pdfmark Title (Dunno which page this is.) /OUT pdfmark The content on the text file should look something like this: /Title (This is page 1) /OUT pdfmark Run Ghostscript command that processes your current PDF file alongside the text file.Create a text file (a PostScript file, really), with a limited set of pdfmark commands, one per line and bookmark you want to add.This one uses Ghostscript to process PDF-to-PDF and the pdfmark PostScript operator to insert the bookmarks.įor some introduction to the pdfmark topic, see also: This is the Bookmark format I noticed after inspecting in Step 4 above. Run PDFTK again: pdftk my.pdf update_info bookmarks.txt output bookmarked.pdf

txt file by adding all the entries you want. Pdftk my.pdf dump_data output bookmarks+otherdata.txt Run one of these commands: pdftk my.pdf dump_data output.
