On 3/12/24 17:06, Jeff Haynes wrote:

I am trying to understand why similar FOs intended for various output engines generate such different results.

More specifically I have a 6 row 5 column table in which in the last row, two cells with data (1^st and last cell) , have keep-together.within-page applied.  When I generate a PDF using AntennaHouse this row appears on page 2.  But in DocX using xmlmind this starts on page 1 and continues onto page two.

I realize we are talking different print engines here.

Unlike all other XSL-FO processors, XFC is not a print engine. It merely translates XSL-FO to word processor formats. Therefore XFC has to cope with the specificities and limitations of these word processor formats.

See also "How to adapt your existing XSLT stylesheet to the specificities of XMLmind XSL-FO Converter", https://www.xmlmind.com/foconverter/adapt_xslt/adapt_xslt.html



But I think that Antenna House is more correct here.

Sure. Antenna House is the reference XSL-FO processor. We, XMLmind, are clearly not.




In your userguide you have reference to keep-together and it’s stated that “Not supported on block-level objects that contain other block-level objects.”  I was curious if this was related here?

Can you let me know if this is a bug, this is the expected output, or what we need to do to get a similar output.


This is not a bug but a limitation.

In your docxModifiedFO.xml, you have added keep-together.within-page="1" to the fo:block contained in a table cell, which is 100% correct. This is translated to paragraph property w:keepLines:

Keep All Lines On One Page

which does not give expected results for your use case.

In my (attached) docxModifiedFO2.xml, I moved keep-together.within-page="1" to the enclosing fo:table-row. This is translated to row property w:cantSplit:

Table Row Cannot Break Across Pages

which gives expected results for your use case (using latest version of XFC of course). See attached docxModifiedFO2.docx.
<?xml version="1.0" encoding="ISO-8859-1"?>
<fo:root
xmlns:xhtml="http://www.w3.org/1999/xhtml";
xmlns:xfc="http://www.xmlmind.com/foconverter/xsl/extensions";
xmlns:version="1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format";
xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions";
xmlns:PrintUtil="com.bm.xchange.services.templateengine.utils.TePrintUtil"
xmlns:HeadingUtil="com.bm.xchange.services.templateengine.headingstyle.TeHeadingStyleUtil"
xmlns:FunctionUtil="com.bm.xchange.services.templateengine.utils.TeFunctionUtil"
xmlns:DateUtil="com.bm.xchange.util.DateUtil"
><fo:layout-master-set
><fo:simple-page-master
margin-bottom="0in"
margin-top="0.001in"
master-name="SECTIONf4539433-06f7-47c7-bd5c-40d54dfbb47a"
page-height="11.0in"
page-width="8.5in"
><fo:region-body
background-image="none"
background-position-horizontal="center"
background-position-vertical="center"
background-repeat="no-repeat"
column-count="1"
column-gap="0.25in"
margin-bottom="1.0in"
margin-left="1in"
margin-right="1in"
margin-top="1.0in"
overflow="hidden"
></fo:region-body
><fo:region-before
></fo:region-before
><fo:region-after
></fo:region-after
><fo:region-start
></fo:region-start
><fo:region-end
></fo:region-end
></fo:simple-page-master
></fo:layout-master-set
><fo:bookmark-tree
></fo:bookmark-tree
><fo:page-sequence
color="#000000"
font-family="Helvetica"
font-size="12pt"
font-style="normal"
font-weight="normal"
line-height="100%"
master-reference="SECTIONf4539433-06f7-47c7-bd5c-40d54dfbb47a"
text-align="left"
text-decoration="none"
><fo:static-content
flow-name="xsl-region-before"
></fo:static-content
><fo:flow
flow-name="xsl-region-body"
><fo:block-container
clip="rect(0,0,-4pt,0)"
margin-bottom="3pt"
overflow="hidden"
><fo:block
><fo:table
border-collapse="collapse"
float="left"
table-layout="fixed"
><fo:table-column
column-width="124.8px"
></fo:table-column
><fo:table-column
column-width="124.8px"
></fo:table-column
><fo:table-column
column-width="124.8px"
></fo:table-column
><fo:table-column
column-width="124.8px"
></fo:table-column
><fo:table-column
column-width="124.8px"
></fo:table-column
><fo:table-body
><fo:table-row
keep-together.within-page="1"
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
><fo:block
linefeed-treatment="preserve"
margin-bottom="0in"
margin-left="0in"
margin-right="0in"
margin-top="0in"
><fo:block
line-height="12pt"
linefeed-treatment="preserve"
text-align="left"
><fo:inline
color="#000000"
font-family="Helvetica"
font-size="12pt"
>HEAD 1</fo:inline
></fo:block
></fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
></fo:table-row
><fo:table-row
keep-together.within-page="1"
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
><fo:block
linefeed-treatment="preserve"
margin-bottom="0in"
margin-left="0in"
margin-right="0in"
margin-top="0in"
><fo:block
line-height="12pt"
linefeed-treatment="preserve"
text-align="left"
><fo:inline
color="#000000"
font-family="Helvetica"
font-size="12pt"
><fo:inline
color="#000000"
font-family="helvetica"
font-size="12pt"
><fo:inline
background-color="#ffffff"
color="#172b4d"
font-family="helvetica"
font-size="11pt"
>Since 23D upgrade, we observed that Keep Table Together is not working in CPQ system and it is splitting small table content in to multiple pages</fo:inline
></fo:inline
></fo:inline
></fo:block
></fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
></fo:table-row
><fo:table-row
keep-together.within-page="1"
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
><fo:block
linefeed-treatment="preserve"
margin-bottom="0in"
margin-left="0in"
margin-right="0in"
margin-top="0in"
><fo:block
line-height="12pt"
linefeed-treatment="preserve"
text-align="left"
><fo:inline
color="#000000"
font-family="Helvetica"
font-size="12pt"
><fo:inline
color="#000000"
font-family="helvetica"
font-size="12pt"
><fo:inline
background-color="#ffffff"
color="#172b4d"
font-family="helvetica"
font-size="11pt"
>Since 23D upgrade, we observed that Keep Table Together is not working in CPQ system and it is splitting small table content in to multiple pages</fo:inline
></fo:inline
></fo:inline
></fo:block
></fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
></fo:table-row
><fo:table-row
keep-together.within-page="1"
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
><fo:block
linefeed-treatment="preserve"
margin-bottom="0in"
margin-left="0in"
margin-right="0in"
margin-top="0in"
><fo:block
line-height="12pt"
linefeed-treatment="preserve"
text-align="left"
><fo:inline
color="#000000"
font-family="Helvetica"
font-size="12pt"
><fo:inline
color="#000000"
font-family="helvetica"
font-size="12pt"
><fo:inline
background-color="#ffffff"
color="#172b4d"
font-family="helvetica"
font-size="11pt"
>Since 23D upgrade, we observed that Keep Table Together is not working in CPQ system and it is splitting small table content in to multiple pages</fo:inline
></fo:inline
></fo:inline
></fo:block
></fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
></fo:table-row
><fo:table-row
keep-together.within-page="1"
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
><fo:block
linefeed-treatment="preserve"
margin-bottom="0in"
margin-left="0in"
margin-right="0in"
margin-top="0in"
><fo:block
line-height="12pt"
linefeed-treatment="preserve"
text-align="left"
><fo:inline
color="#000000"
font-family="Helvetica"
font-size="12pt"
><fo:inline
color="#000000"
font-family="helvetica"
font-size="12pt"
><fo:inline
background-color="#ffffff"
color="#172b4d"
font-family="helvetica"
font-size="11pt"
>Since 23D upgrade, we observed that Keep Table Together is not working in CPQ system and it is splitting small table content in to multiple pages</fo:inline
></fo:inline
></fo:inline
></fo:block
></fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
></fo:table-row
><fo:table-row
keep-together.within-page="1"
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
><fo:block
linefeed-treatment="preserve"
margin-bottom="0in"
margin-left="0in"
margin-right="0in"
margin-top="0in"
><fo:block
line-height="12pt"
linefeed-treatment="preserve"
text-align="left"
><fo:inline
color="#000000"
font-family="Helvetica"
font-size="12pt"
><fo:inline
color="#000000"
font-family="helvetica"
font-size="12pt"
><fo:inline
background-color="#ffffff"
color="#172b4d"
font-family="helvetica"
font-size="11pt"
>Since 23D upgrade, we observed that Keep Table Together is not working in CPQ system and it is splitting small table content in to multiple pages</fo:inline
></fo:inline
></fo:inline
></fo:block
></fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
></fo:block
></fo:block-container
></fo:table-cell
><fo:table-cell
border-bottom="1px solid #000000"
border-left="1px solid #000000"
border-right="1px solid #000000"
border-top="1px solid #000000"
cpq-cell="1"
padding="4px 0px"
><fo:block-container
clip="rect(-3pt,0,-3pt,0)"
overflow="hidden"
><fo:block
><fo:block
linefeed-treatment="preserve"
margin-bottom="0in"
margin-left="0in"
margin-right="0in"
margin-top="0in"
><fo:block
line-height="12pt"
linefeed-treatment="preserve"
text-align="left"
><fo:inline
color="#000000"
font-family="Helvetica"
font-size="12pt"
><fo:inline
color="#000000"
font-family="helvetica"
font-size="12pt"
><fo:inline
background-color="#ffffff"
color="#172b4d"
font-family="helvetica"
font-size="11pt"
>Since 23D upgrade, we observed that Keep Table Together is not working in CPQ system and it is splitting small table content in to multiple pages</fo:inline
></fo:inline
></fo:inline
></fo:block
></fo:block
></fo:block
></fo:block-container
></fo:table-cell
></fo:table-row
></fo:table-body
></fo:table
></fo:block
></fo:block-container
><fo:block
font-family="Helvetica"
font-size="1pt"
id="lastBlockId"
line-height="0pt"
>&#65533;</fo:block
></fo:flow
></fo:page-sequence
></fo:root
>

Attachment: docxModifiedFO2.docx
Description: MS-Word 2007 document

--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support

Reply via email to