I further reduced the test case to just 4 fo:block elements, one with a footnote; attached.
I did some initial debugging, and what I see is that if I remove the first two fo:block elements in the source file, the footnote is rendered properly (see without- page-1.pdf) - even though the content on page 2 does not change. This leads me to think that the PageBreakingAlgorithm.restartFrom() is not resetting the context correctly when it introduces a page break point after the 1st page. I am currently at my end of my knowledge about FOP's internals. Is there anybody here that could offer some pointers where to look, or am I talking to myself on this list? Regards, Alexey. On Saturday, September 14, 2013 11:53:09 PM Alexey Neyman wrote: Hi, If someone would be interested in looking into this, I've reduced the test case to much smaller FO file - 29 lines, 3 pages in the generated PDF. Attached to this email. Regards, Alexey. On Friday, September 13, 2013 03:23:35 PM Alexey Neyman wrote: Hi FOP developers, I am hitting the issue described in FOP issue 2106 [1]. I tried the workaround mentioned in that issue (remove line-height-shift-adjustment from fo:root) and while it helped the test FO attached to that issue, it didn't make any effect on the document I have. I am also seeing other manifestations of the same issue - where a footnote is placed on the page before it is referenced, even though in other cases there is sufficient space at the bottom of the page to accommodate that footnote. As far as I see, it always happens when the reference to that footnote is placed on the first line of the page. This is probably why the workaround in [1] worked for the bad-footnote.fo attached to that issue, as without line-height-shift-adjustment the reference to that footnote moves from the first line of the page down. Any pointers as to what may be causing that issue and/or workarounds would be appreciated. [1] https://issues.apache.org/jira/browse/FOP-2106 Regards, Alexey.
<?xml version="1.0"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="serif,Symbol,ZapfDingbats" font-size="10pt" text-align="justify"> <fo:layout-master-set> <fo:simple-page-master master-name="pm" page-width="100pt" page-height="100pt"> <fo:region-body column-count="1"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="pm"> <fo:static-content flow-name="xsl-footnote-separator"> <fo:block> <fo:leader color="black" leader-pattern="rule" leader-length="100pt"/> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block-container height="56pt" background-color="red"> <fo:block/> </fo:block-container> <fo:block>A line</fo:block> <fo:block>Here is some text<fo:footnote><fo:inline font-size="75%" baseline-shift="super">X</fo:inline><fo:footnote-body><fo:block>A</fo:block><fo:block>B</fo:block></fo:footnote-body></fo:footnote> with a footnote. We will see how it is formatted.</fo:block> </fo:flow> </fo:page-sequence> </fo:root>
a.pdf
Description: Adobe PDF document
without-page-1.pdf
Description: Adobe PDF document
--------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org