Changing PDF cover page based on a custom parameter
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 31
- Joined: Sat Jan 17, 2015 6:21 pm
Changing PDF cover page based on a custom parameter
Hi,
Using a PDF publishing template, I can add some content to a cover page as explained on this page
https://www.oxygenxml.com/doc/versions/ ... _page.html
with some css like *[class ~= "front-page/front-page-title"]:after(1)
But what I would like to do is add this content only if a custom parameter is set.
I tried a few match pattern inside my merged2html5Extension.xsl
<extension id="com.oxygenxml.pdf.css.xsl.merged2html5" file="xslt/merged2html5Extension.xsl"/>
Example: <xsl:template match="oxy:*[contains(@class, ' front-page/front-page-title ')]">
But I cannot figure out a pattern that works...
Is it possible to change the cover page content via a template or any other way based on a custom parameter?
This custom parameter is working fine within my merged2html5Extension.xsl file on some DITA elements.
Any help is appreciated.
Regards,
Raymond
Using a PDF publishing template, I can add some content to a cover page as explained on this page
https://www.oxygenxml.com/doc/versions/ ... _page.html
with some css like *[class ~= "front-page/front-page-title"]:after(1)
But what I would like to do is add this content only if a custom parameter is set.
I tried a few match pattern inside my merged2html5Extension.xsl
<extension id="com.oxygenxml.pdf.css.xsl.merged2html5" file="xslt/merged2html5Extension.xsl"/>
Example: <xsl:template match="oxy:*[contains(@class, ' front-page/front-page-title ')]">
But I cannot figure out a pattern that works...
Is it possible to change the cover page content via a template or any other way based on a custom parameter?
This custom parameter is working fine within my merged2html5Extension.xsl file on some DITA elements.
Any help is appreciated.
Regards,
Raymond
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Changing PDF cover page based on a custom parameter
Post by julien_lacour »
Hi Raymond,
Depending on what you want to achieve, one of the solution could be to style using custom parameters, you can add for example the args.css.param.info-cover="yes" parameter into the Configure Transformation Scenario(s) dialog, in your custom DITA Map PDF - based on HTML5 & CSS scenario, then match it in the CSS like this:
Like this, if you don't want the information to be displayed, you can simply remove the parameter or set it to "no".
Regards,
Julien
Depending on what you want to achieve, one of the solution could be to style using custom parameters, you can add for example the args.css.param.info-cover="yes" parameter into the Configure Transformation Scenario(s) dialog, in your custom DITA Map PDF - based on HTML5 & CSS scenario, then match it in the CSS like this:
Code: Select all
:root[info-cover='yes'] *[class ~= "front-page/front-page-title"]:after(1) {
...
}
Regards,
Julien
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)
- ↳ 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