Page 1 of 1

PDF - CSS (DITA) Transform Creates a Duplicate Blank First Page

Posted: Wed Feb 27, 2019 6:55 pm
by shannonxtreme
When generating a PDF using DITA-CSS transforms, a blank first page is generated. The front-page and toc are both hidden in the CSS file.

This blank page is not displayed when generating the same DITA Map in v20.1.

This is only visible when viewed in Adobe Reader/Acrobat.

Opening the merged.xml file in a browser with Rendering > print enabled shows the output as intended. In the bookmarks pane on Acrobat, the DITA Map ID is displayed at the top level but does not lead anywhere.

Edit: using v21.0 of Oxygen

Used the following to try and work around:

Code: Select all

*[class ~= "map/map"] > *[class ~= "toc/toc"] {
display:none;
}

*[class ~= "map/map"] > *[class ~= "toc/toc"] > *[class ~= "toc/title"]{
bookmark-label: none;
-ah-bookmark-label: none;
}

*[class ~= 'map/map'] > *[class ~= 'front-page/front-page'] {
display:none !important;
}

Re: PDF - CSS (DITA) Transform Creates a Duplicate Blank First Page

Posted: Wed Feb 27, 2019 7:39 pm
by Costin
Hi shannonextreme,

There is indeed a discrepancy between the output obtained with 20.1 and the output obtained with 21.
However, note that starting with the new version 21, there is a predefined parameter that you could use for this purpose.
Just edit the transformation scenario, go to the Parameters tab and set the "hide.frontpage.toc.index.glossary" parameter to "yes".

Regards,
Costin

Re: PDF - CSS (DITA) Transform Creates a Duplicate Blank First Page

Posted: Wed Feb 27, 2019 7:43 pm
by shannonxtreme
Costin wrote:Hi shannonextreme,

There is indeed a discrepancy between the output obtained with 20.1 and the output obtained with 21.
However, note that starting with the new version 21, there is a predefined parameter that you could use for this purpose.
Just edit the transformation scenario, go to the Parameters tab and set the "hide.frontpage.toc.index.glossary" parameter to "yes".

Regards,
Costin
Hi Costin, that worked perfectly! Thank you. Since this parameter exists now, are the CSS rules for hiding the TOC and Cover Page redundant?

Re: PDF - CSS (DITA) Transform Creates a Duplicate Blank First Page

Posted: Thu Feb 28, 2019 4:47 pm
by Dan
I think you can safely remove them from your customization.

Many regards,
Dan