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 David Cramer <da...@rackspace.com> on 2012/04/11 21:13:07 UTC

widows and orphans attributes on fo:block in fop 1.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Using fop 1.0, I have the following fo:block (with widows and orphans
set to 5):

<fo:block
    space-before.minimum="0.8em"
    space-before.optimum="1em"
    space-before.maximum="1.2em"
    space-after.minimum="0.8em"
    space-after.optimum="1em"
    space-after.maximum="1.2em"
    hyphenate="false"
    wrap-option="wrap"
    white-space-collapse="false"
    white-space-treatment="preserve"
    linefeed-treatment="preserve"
    text-align="start"
    font-family="monospace"
    font-size="85%"
    widows="5"
    orphans="5"
    hyphenation-character="\"
    background-color="#E0E0E0"
    id="d40e2055">{
  "blah:group": {
      "id" : "1234",​
      "name" : "newName",​
      "description" : "A new description"
  }
}
</fo:block>

When I render a pdf, I'm seeing this listing split across the page
with the penultimate two lines (the "}" and a linefeed) at the top of
a new page. According to the Compliance page [1], widows and orphans
is supported. Am I using it incorrectly or misunderstanding what it
should do?

Thanks,
David

[1] https://xmlgraphics.apache.org/fop/compliance.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPhdfDAAoJEMHeSXG7afUhD14H/0bQlD3xsdPnooE6kPaG8WlK
4NmkMqculA2AEuuSuYiIUG/v2L2l/vQ3+rR8lj/NOYCCGosqA+B5p3ESU+CS90Vo
eAJr68grsCQ2yYLWiXumO7S+T807Sayf96oDuNBlbcGgYkgMtOrMJfpE4Y4Kyc0V
dY1ODjOvEtFaTMs+BAZTmhLmRRfUKjPKeJa80doqwUJol3//aZisDIKzt6s4100Y
m2odUB+enlLbCkN5EL0jDlsudVDFrxMmiCADbLkn9IytO8mY5uhuTng9LMA8aW9a
PR5p3RJQJ547ZSIO0ZkNcwcfh6Xqfz2BOYM1G/OLsGFryzP3SwASGhGgBg8WnPE=
=7Tyi
-----END PGP SIGNATURE-----

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


Re: widows and orphans attributes on fo:block in fop 1.0

Posted by Pascal Sancho <pa...@takoma.fr>.
Hi David,

sorry for late answer.

What you report is related to Bugzilla issue #44328 (see [1]).

orphans and widows properties are not taken into account when 
LF-treatment="preserve".
You can try to apply the patch and feedback if success.

[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=44328


Le 11/04/2012 21:13, David Cramer a écrit :
> Using fop 1.0, I have the following fo:block (with widows and orphans
> set to 5):
>
> <fo:block
>      space-before.minimum="0.8em"
>      space-before.optimum="1em"
>      space-before.maximum="1.2em"
>      space-after.minimum="0.8em"
>      space-after.optimum="1em"
>      space-after.maximum="1.2em"
>      hyphenate="false"
>      wrap-option="wrap"
>      white-space-collapse="false"
>      white-space-treatment="preserve"
>      linefeed-treatment="preserve"
>      text-align="start"
>      font-family="monospace"
>      font-size="85%"
>      widows="5"
>      orphans="5"
>      hyphenation-character="\"
>      background-color="#E0E0E0"
>      id="d40e2055">{
>    "blah:group": {
>        "id" : "1234",​
>        "name" : "newName",​
>        "description" : "A new description"
>    }
> }
> </fo:block>
>
> When I render a pdf, I'm seeing this listing split across the page
> with the penultimate two lines (the "}" and a linefeed) at the top of
> a new page. According to the Compliance page [1], widows and orphans
> is supported. Am I using it incorrectly or misunderstanding what it
> should do?

-- 
Pascal

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