Command to add bookmark structure

Add bookmarks

--addbookmark <XML file> <PDF file>

Purpose

The structure for bookmarks has to be defined in a XML file. It is also possible to use various formatting styles for the bookmarks ("PLAIN", "BOLD", "ITALIC", "BOLD_ITALIC" and colors "R,G,B"). This formatting will only be shown if the respective PDF viewer supports such styling information.

Also a subcategorization for the bookmark tree is possible.

Only page numbers as destinations can be defined, but e.g. no coordinates on a specific page.

Sample XML file

<?xml version="1.0" encoding="utf-8"?>
<BOOKMARKS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="bookmarks.xsd">
  <BOOKMARK ORDER="100" TITLE="Title 1" PAGE_NUMBER="2" />
  <BOOKMARK ORDER="200" TITLE="Title 2" PAGE_NUMBER="3"  STYLE="BOLD" />
  <BOOKMARK ORDER="300" TITLE="Title 3" PAGE_NUMBER="1" />
  <BOOKMARK ORDER="301" TITLE="Title 3.1" PAGE_NUMBER="4" />
  <BOOKMARK ORDER="302" TITLE="Title 3.2" PAGE_NUMBER="5" COLOR="255,0,0"/>
  <BOOKMARK ORDER="400" TITLE="Title 4" PAGE_NUMBER="7" />
</BOOKMARKS>
Click to copy

Resulting bookmark structure: