You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Abel Braaksma <ab...@xs4all.nl> on 2007/03/15 14:56:27 UTC

linefeed-treatment=preserve and orphans/windows do not work as expected

Hi Fop-users!

I believe this is a bug (perhaps I should better post it to fop-dev?). 
Personally, I do not need this feature, I tend to avoid 
linefeed-treatment altogether, I consider them evil ;)

The orphans and windows control is ignored completely when 
linefeed-treatment is set to "preserve", even the default setting of "2" 
is ignored, leaving one line on the next page instead of the expected 
two. To illustrate this behavior, here's a little 2inch square page:

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <fo:layout-master-set>
        <fo:simple-page-master
            master-name="test-page-master" page-width="2in"
            page-height="2in">
            <fo:region-body margin="0.35in"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence
        master-reference="test-page-master">
        <fo:flow flow-name="xsl-region-body">
            <fo:block widows="2" orphans="2"
             linefeed-treatment="preserve">Neque
                porro quisquam
                est qui dolorem
                ipsum quia
                dolor sit amet,
                consectetur,
                adipisci velit...</fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>


The last line, "adipisci velit..." is placed on its own on the next 
page. Expected are the last two lines (even when widows/orhpans were not 
set).

I tested with FOP 0.93.

Cheers,
-- Abel

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org