Edit online

The PDF Bookmarks are used to generate a hierarchical structure similar to a table of contents in a specialized view of your PDF Reader.

Edit online

The PDF bookmarks are generated by matching the titles from the topics in the content. The built-in CSS rules are in: [PLUGIN_DIR]/css/print/p-bookmarks.css.

Edit online

By default, the PDF bookmarks are generated for up to 7 levels. If you need to limit them (for example to 2 levels), you can use the following CSS rules in your customization CSS:

*[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"],
*[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"],
*[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"],
*[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"],
*[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"] {
  bookmark-label:none;
}

These rules clear the labels generated by the titles starting with the depth 3 (the topic nesting level is given by the selectors *[class~="topic/topic"]).

Edit online

By default, the PDF bookmark labels are generated while taking the text set before the chapters titles into account. Since this usually contains the part, chapter, or section numbers, the PDF Bookmarks will make use of them.

The solution is to remove the content(before) from the bookmark-label, leaving just the content(text).

In your customization CSS, add the following CSS rules:

*[class~="topic/topic"] > *[class~="topic/title"] {
  bookmark-label: content(text);  
  -ah-bookmark-label: content();
}