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

shannonxtreme
Posts: 31
Joined: Fri Aug 24, 2018 4:27 pm

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

Post by shannonxtreme » Wed Feb 27, 2019 6:55 pm

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;
}

Costin
Posts: 695
Joined: Mon Dec 05, 2011 6:04 pm

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

Post by Costin » Wed Feb 27, 2019 7:39 pm

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
Costin Sandoi
oXygen XML Editor and Author Support

shannonxtreme
Posts: 31
Joined: Fri Aug 24, 2018 4:27 pm

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

Post by shannonxtreme » Wed Feb 27, 2019 7:43 pm

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?

Dan
Posts: 453
Joined: Mon Feb 03, 2003 10:56 am

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

Post by Dan » Thu Feb 28, 2019 4:47 pm

I think you can safely remove them from your customization.

Many regards,
Dan

Post Reply