Pagination

Here should go questions about transforming XML with XSLT and FOP.
SimonH
Posts: 19

Pagination

Thu Apr 28, 2016 3:58 pm

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: 302
Location: Craiova

Re: Pagination

Tue May 03, 2016 3:14 pm

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

Re: Pagination

Wed Aug 16, 2017 5:37 pm

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: 5095

Re: Pagination

Thu Aug 17, 2017 9:06 am

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

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 1 guest