Hi Rob,

sure you are facing a bug:
when there is no room on 1 page to insert a line-break, then, if IPD change on next page, the described FOPException is thrown.

See the attached minimal XSL-FO: when you remove the expression
 " + 0.001pt" from the margin-top value, it works like charm.

Can you please fill in a bug on FOP bug list, attaching this minimal XSL-FO?

As a workaround, you should decrease the margin-top of your simple-page-master "gallery6-page-3" (leaving room for 2 * line-height, and/or add a break-before on the %block% that come in 1st place of your page 4.

Le 01/06/2012 04:00, Rob Sargent a écrit :
We're using FOP-1.0.

Admittedly it may be a stretch to call these "simple" page layouts but
the attached FOs show that the ordering of the page layouts can cause
the generation of the pdf to fail. The fo-fails.xml exists with

    Caused by: java.lang.UnsupportedOperationException: Don't know how
    to restart at positionNonLeafPos:927(Flow@61f93f69[@id=]],
    NonLeafPos:399(BlockContainer@52ab9d99[@id=group-Normal Development
    and Anatomy of the Cerebral Commissures]],
    NonLeafPos:106(BlockContainer@e09d7b9[@id=]],
    NonLeafPos:7(Block@58a2b90b[@id=]], LeafPos:-1(pos=29,
    lm=Block@58a2b90b[@id=]])))))
    at
    org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:377)
    at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:85)
    at
    
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:107)
    at
    
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238)
    at
    org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
    at
    
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
    at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
    at
    
com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:261)
    at org.jdom.output.SAXOutputter.endElement(SAXOutputter.java:1046)
    at org.jdom.output.SAXOutputter.element(SAXOutputter.java:903)
    at org.jdom.output.SAXOutputter.elementContent(SAXOutputter.java:1093)
    at org.jdom.output.SAXOutputter.elementContent(SAXOutputter.java:1067)
    at org.jdom.output.SAXOutputter.element(SAXOutputter.java:897)
    at org.jdom.output.SAXOutputter.output(SAXOutputter.java:621)
    at
    org.jdom.transform.JDOMSource$DocumentReader.parse(JDOMSource.java:476)
    at
    
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:636)
    at
    
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:707)
    ... 7 more

Some explaintion of the intent: The "three-side-page-*" s-m-ps usurp a
two-column text xsl-region body placing a static region over one of the
columns and the gallery6-page-* attempt to set the size of the
region-body to zero (creating a 'text-less' page).

Note that the gallery6-page-* layout was recently reworked to be
textless. Prior to that (developed originally in FOP-0.95) we had an
inch of text available and detected no order dependency amongst the
orderings of layouts.

And yes the s-m-ps are generated on the fly by the xsl translation,
whereby a static page definitions is loaded into a page-number specific
master, also left/right adjusted.

Furthermore, in other we also experience a single line of text on the
gallery6-page-*s only when preceded by a three-side-page-* s-m-p. If
necessary I will report that as a separate issue, but at this point I'm
hoping both symptoms are tightly related.

Any work-around much appreciated. If requested, I'm more than willing to
report this as a bug. Unfortunately we cannot wait for FOP-1.1 but we
could run off the trunk.

As I see it the diffs in the two attached FO's are entirely in the
static-regions as one would expect.

We're at crunch time and could go back to the original definition of
gallery6-page* but would /really/ rather not.

Cheers,

rjs


--
Pascal
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"; font-size="1in" line-height="1">
  <fo:layout-master-set>
    <fo:simple-page-master page-width="8.5in" page-height="11in" master-name="gallery6-page-3">
      <fo:region-body margin-right="0.1in" margin-top="9in + 0.001pt"/>
    </fo:simple-page-master>
    <fo:simple-page-master page-width="8.5in" page-height="11in" master-name="three-side-page-4">
      <fo:region-body/>
    </fo:simple-page-master>
    <fo:page-sequence-master master-name="document-sequence">
      <fo:single-page-master-reference master-reference="gallery6-page-3" />
      <fo:single-page-master-reference master-reference="three-side-page-4" />
    </fo:page-sequence-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="document-sequence">
    <fo:flow flow-name="xsl-region-body">
      <fo:block>
        text text text text text text text text text text text text text text
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to