Pagination

Here should go questions about transforming XML with XSLT and FOP.
SimonH
Posts: 19
Joined: Thu Mar 29, 2012 4:45 pm

Pagination

Post by SimonH »

Has anyone modified the keep-together rules to support better pagination from the DITA-OT with Apache FOP. I notice things like a stepresult are allowed to flow onto a new page without the step. Likewise I get the odd 1 line paragraph in a table that gets split to the next page.

Do any of the other renderers do a better job of pagination or do I need to hack around the XSLT and set properties on some elements to try keep stuff together better.

-Simon
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Pagination

Post by radu_pisoi »

Hello,

To avoid that a stepresult to be placed at the start of a new page you can set the 'keep-together' XSL-FO property to the 'steps.step' attribute set.

To do this, you need to create a DITA PDF customization plugin or to set a Customization Directory for PDF Output. A detailed procedure for
the second method can be found here:
* http://oxygenxml.com/doc/versions/18.0/ ... ation.html

In [DITA-PDF-Customization]/fo/attrs/custom.xsl (make sure you renamed the 'custom.xsl' file from 'custom.xsl.orig' and un-comment the entry to it in 'catalog.xml') add the next attribute set:

Code: Select all

<xsl:attribute-set name="steps.step" use-attribute-sets="ol.li">
<xsl:attribute name="space-after">3pt</xsl:attribute>
<xsl:attribute name="space-before">3pt</xsl:attribute>

<xsl:attribute name="keep-together.within-page">always</xsl:attribute>
</xsl:attribute-set>
I think that a similar customization can be done for the table cells.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
majacques
Posts: 2
Joined: Mon Jun 13, 2016 11:30 am

Re: Pagination

Post by majacques »

Hello,

I am currently facing the same situation, both for stepresults and info elements after a step, when stepresults and info elements contain a lot of text, and setting the keep-together.within-page attribute, for steps.step, to "always", did not solve the issue.
Where else can I look to fix this?

Thank you,

Marc
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: Pagination

Post by Radu »

Hi Marc,

Are you generating the PDF using the default Apache FOP processor or using one of the commercial PDF processors like Antenna House or RenderX XEP?
Are you sure that your customization is applied? If you set the "clean.temp" parameter to "no" in the transformation scenario and after the transformation open the "topic.fo" XSL-FO file from the transformation temporary folder, does it contain your customization?
If it does, maybe you can zip and send us a small DITA project exemplifying the problem + your PDF customization folder or plugin:

https://www.oxygenxml.com/techSupport.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply