XSL FO continued / tables, footer markers

I use markers and a "retrieve-table-marker" in XSL-FO to create footers in a PDF conversion.

I need a solution in which a single-column table has a β€œclean” footer, and a multi-column table has a footer with added text (β€œcontinued”) before each column break. Added text should be applied only before page breaks if the table is split between columns.

My current code almost does this. It works well for tables with multiple columns, but for the table with one column, the text "continue" is added, although the table is not interrupted.

Code:

<fo:table-body> <fo:table-row> <fo:table-cell> <fo:block> <fo:marker marker-class-name="footer-continued">(continued)</fo:marker> </fo:block> <fo:block> <xsl:text>Contents</xsl:text> </fo:block> <fo:block> <fo:marker marker-class-name="footer-continued"></fo:marker> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> <fo:table-footer> <fo:table-row> <fo:table-cell> <fo:block> <fo:retrieve-table-marker retrieve-class-name="footer-continued" retrieve-position="first-including-carryover" retrieve-boundary-within-table="table"/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-footer> 
+4
source share
1 answer

Ok, this worked for me:

I swapped

 retrieve-position="first-including-carryover" 

for

 retrieve-position-within-table="last-ending-within-page" 
+3
source

Source: https://habr.com/ru/post/1383873/


All Articles