Forum How do I...?

How do I display only the first level of the table of contents?

nico
When displaying the table of contents of a PDF document, some applications choose to expand all levels (e.g. Firefox), while others only display the first level (e.g. Preview).

Is it possible to specify that only the first level is to be displayed for all applications?

Firefox
firefox.png


Preview
preview.png
  1. firefox.png335.2 kB
  2. preview.png222.6 kB
  3. toc-problem.html0.3 kB
  4. toc-problem.pdf15.6 kB

Edited by nico

mikeday
You can apply the -prince-bookmark-state property to the heading:

https://www.princexml.com/doc/css-props/#prop-prince-bookmark-state
nico
Unbelievable, it works!

* { bookmark-state: closed }


Thanks a lot Mike!