apply forced page breaks on level 2 or 3 topics using css

Post here questions and problems related to editing and publishing DITA content.
dpksaini89
Posts: 66
Joined: Thu Feb 08, 2018 2:44 pm

apply forced page breaks on level 2 or 3 topics using css

Post by dpksaini89 »

Hi,

I wish to apply forced page breaks, whenever required for level 2 and 3 topics or any other topic so that the content looks properly formatted in the pdf output.

The earlier sources available in the forum have customized xsl. But i wish to do it using either css or built in attributes.

Is that possible? If yes, please share how to customize my custom.css to achieve this.

Image.

Here in the attached image, I wish to start para 3.8 (level 2 heading) from new page.
Costin
Posts: 846
Joined: Mon Dec 05, 2011 6:04 pm

Re: apply forced page breaks on level 2 or 3 topics using css

Post by Costin »

Hi dpksaini89,

It is indeed possible to start specific topics on a new page in PDF.
For that, you should use the DITA Map PDF WYSIWYG transformation scenario and set the correct "page-break" @outputclass attribute on specific topics.
For example, if you have a topic that want to start on a new page, you could set the "outputclass="page-break-before" on the root of that topic.

Code: Select all

Ex.: <topic outputclass="page-break-before">
In a similar way you could break page after or avoid page breaks at all for specific topics.

More information available on this page from the User-Guide.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
Post Reply