CSS/HTML PDF - Removing front matter leaves artifacts
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 167
- Joined: Tue Mar 06, 2018 1:34 am
CSS/HTML PDF - Removing front matter leaves artifacts
Oxygen 21.1 2019061404
I want to create PDFs that begin with the content immediately, without any front matter. So I want to remove the cover page and Table of Contents.
Starting with a duplicate of the PDF HTML5&CSS scenario. I use a publishing template to connect a blank CSS file to it. I generate the PDF, and it looks like exactly like the default scenario...makes sense, because the CSS is blank.
Now, I want to remove the cover page. So I add this rule:
*[class~="front-page/front-page"] {
display: none !important;
}
When I generate the content, the cover page is gone as expected. But there is still a problem: The PDF bookmark of the cover page remains...even though the first page of the generated PDF is the TOC:
https://i.imgur.com/6SvTNqz.jpg
Now, I want to remove the table of contents. So I add this rule:
*[class~="toc/toc"]{
display: none !important;
}
Now, there are 3 problems:
1. The PDF bookmark of the cover page is still there (see previous image).
2. The first page (which used to have the table of contents) is blank: https://i.imgur.com/YiE7zhu.jpg
3. The PDF bookmark that contained the TOC is still present, although it is blank: https://i.imgur.com/mcREEtR.jpg
Any suggestions?
I want to create PDFs that begin with the content immediately, without any front matter. So I want to remove the cover page and Table of Contents.
Starting with a duplicate of the PDF HTML5&CSS scenario. I use a publishing template to connect a blank CSS file to it. I generate the PDF, and it looks like exactly like the default scenario...makes sense, because the CSS is blank.
Now, I want to remove the cover page. So I add this rule:
*[class~="front-page/front-page"] {
display: none !important;
}
When I generate the content, the cover page is gone as expected. But there is still a problem: The PDF bookmark of the cover page remains...even though the first page of the generated PDF is the TOC:
https://i.imgur.com/6SvTNqz.jpg
Now, I want to remove the table of contents. So I add this rule:
*[class~="toc/toc"]{
display: none !important;
}
Now, there are 3 problems:
1. The PDF bookmark of the cover page is still there (see previous image).
2. The first page (which used to have the table of contents) is blank: https://i.imgur.com/YiE7zhu.jpg
3. The PDF bookmark that contained the TOC is still present, although it is blank: https://i.imgur.com/mcREEtR.jpg
Any suggestions?
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: CSS/HTML PDF - Removing front matter leaves artifacts
Hi,
Please note that starting with the version 21, a dedicated transformation parameter was implemented in the DITA Map PDF - based on HTML5 and CSS scenario.
The parameter (called "hide.frontpage.toc.index.glossary") may be enabled to obtain the desired results, removing the front page and TOC without any leading blank pages or bookmarks in the PDF output.
Just edit the transformation scenario, look for the parameter in the "Parameters" tab and set its value to "yes".
Regards,
Costin
Please note that starting with the version 21, a dedicated transformation parameter was implemented in the DITA Map PDF - based on HTML5 and CSS scenario.
The parameter (called "hide.frontpage.toc.index.glossary") may be enabled to obtain the desired results, removing the front page and TOC without any leading blank pages or bookmarks in the PDF output.
Just edit the transformation scenario, look for the parameter in the "Parameters" tab and set its value to "yes".
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
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