Idea Delivered
over 1 year ago

This will be available with the XPP 9.4 version release.

Direct PDF: create bookmark to a named destination

Currently you can not create a bookmark that points to a named destination.

In some publications though it is necessary to create a bookmark at a spot in document that is destination of the bookmark, but the bookmark needs to bring you to a totally different spot in the document.

A real world example of this are the MIL spec type of documents that have in the front of the document List of Illustrations.
First we need a bookmark called 'List of Illustration' that point to the page containing the list of illustrations (that is no problem for the moment)
But underneath this bookmark in a second level we need bookmarks for each illustration contained in that list, but the bookmark can not point to the List of Illustration page itself but has to point to the actual illustration that is somewhere else in the document.

In order to make this possible, I propose the following:

Please add a new option to the "target" field in the -xpp-pdf-boomark CSS property.

Example syntax:
  -xpp-pdf-bookmark: "type={book} level={2} state={open} target={dest(name_of_named_destination_as_string)}"; 
or even better:
  -xpp-pdf-bookmark: "type={book} level={2} state={open} target={dest(attr(name))}";
– where target=dest(named_destination) or dest(attr(name)) allows the target of a bookmark to be a named destination

Example of use and setup:
I have an XML element somewhere in the body of the document which creates a "named destination":
<annot type="dest" dest="french">French (fr)</annot>

with CSS like:
annot[type="dest"] {
   -xpp-pdf-annotation: "type= {dest} text={attr(dest)}";
}

Then I could create a "List of Destinations" at the start of the document, looking like: 
<dest_list>
  <dest name="english">English (en)</dest>
  <dest name="french">French (fr)</dest>
</dest_list>

with CSS like:
dest_list {
  -xpp-pdf-bookmark: "type= {book} text={List of Destinations}";
}
dest_list dest {
   -xpp-pdf-bookmark: "type=\{book} level={2} state={open} target={dest(attr(name))}";
   -xpp-pdf-annotation: "type={2dest} text={attr(name)}";
   -xpp-pdf-annotation-options: "contents={jump to named destination: attr(name)} ";
}