Remove just the Index from pdf-css output - Chemistry

Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
axhxu
Posts: 48
Joined: Thu Aug 27, 2015 9:28 pm

Remove just the Index from pdf-css output - Chemistry

Post by axhxu »

Hi,
Does anyone have a simple solution to exclude just the index from being included in the pdf?
Thanks
julien_lacour
Posts: 703
Joined: Wed Oct 16, 2019 3:47 pm

Re: Remove just the Index from pdf-css output - Chemistry

Post by julien_lacour »

Hello,

If you are generating PDF using the DITA Map PDF - based on HTML5 & CSS scenario, you can add the following rules into a custom CSS stylesheet:

Code: Select all

/* Remove the index from the TOC */
*[class ~= "map/topicref"][is-index] {
  display: none;
}
/* Remove the index from the content and the bookmarks */
*[class ~= "index/groups"] {
  display: none;
  bookmark-level: 0;
}
If you are using a <bookmap>, the index is generated by the presence of the <indexlist/> element, if you remove it, it will not be generated.

Regards,
Julien
Post Reply