How to get pdf bookmarks in Prince pdf-WYSIWYG transformation?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 8
- Joined: Thu Sep 29, 2016 12:44 am
How to get pdf bookmarks in Prince pdf-WYSIWYG transformation?
I'm using Oxygen XML Author 18.1 build 2016112217 and I'm trying to configure the WYSIWYG transformation so that the pdf generated with the Prince CSS processor has bookmarks.
I've tried adding:
*[class~='topic/topic'] { prince-bookmark-level: 1 }
*[class~='topic/topic'] > *[class~='topic/title'] { prince-bookmark-level: 2 }
or:
h1 { prince-bookmark-level: 1 }
h2 { prince-bookmark-level: 2 }
to p-styling.css based on https://www.princexml.com/doc/8.1/pdf-bookmarks/. I also tried setting p-styling.css in the args.css parameter in the scenario settings since CSS I had in p-styling.css didn't seem to be implemented automatically. But none of this has had an effect.
Thanks for your help,
Justine
I've tried adding:
*[class~='topic/topic'] { prince-bookmark-level: 1 }
*[class~='topic/topic'] > *[class~='topic/title'] { prince-bookmark-level: 2 }
or:
h1 { prince-bookmark-level: 1 }
h2 { prince-bookmark-level: 2 }
to p-styling.css based on https://www.princexml.com/doc/8.1/pdf-bookmarks/. I also tried setting p-styling.css in the args.css parameter in the scenario settings since CSS I had in p-styling.css didn't seem to be implemented automatically. But none of this has had an effect.
Thanks for your help,
Justine
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: How to get pdf bookmarks in Prince pdf-WYSIWYG transformation?
Hello Justine,
You can use the following CSS snippet (it will be included in oXygen 19):
A good practice is to save this all the customization outside the oXygen installation directory (let say on the Desktop), then alter the transformation scenario "args.css" parameter to point to this additional CSS. In this way you will not loose the file when you upgrade to a new oXygen version.
Many regards,
Dan
You can use the following CSS snippet (it will be included in oXygen 19):
Code: Select all
@media print {
*[class~="topic/topic"] > *[class~="topic/title"] {
prince-bookmark-level: 1;
-ah-bookmark-level: 1;
}
*[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"] {
prince-bookmark-level: 2;
-ah-bookmark-level: 2;
}
*[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"] {
prince-bookmark-level: 3;
-ah-bookmark-level: 3;
}
*[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"] {
prince-bookmark-level: 4;
-ah-bookmark-level: 4;
}
*[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"] {
prince-bookmark-level: 5;
-ah-bookmark-level: 5;
}
*[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"] {
prince-bookmark-level: 6;
-ah-bookmark-level: 6;
}
*[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"] {
prince-bookmark-level: 7;
-ah-bookmark-level: 7;
}
}
A good practice is to save this all the customization outside the oXygen installation directory (let say on the Desktop), then alter the transformation scenario "args.css" parameter to point to this additional CSS. In this way you will not loose the file when you upgrade to a new oXygen version.
Many regards,
Dan
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service