You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Dan Caprioara (JIRA)" <ji...@apache.org> on 2018/08/06 12:46:00 UTC
[jira] [Created] (FOP-2809) Excessive wrap when having
linefeed-treatment="preserve" and inlines
Dan Caprioara created FOP-2809:
----------------------------------
Summary: Excessive wrap when having linefeed-treatment="preserve" and inlines
Key: FOP-2809
URL: https://issues.apache.org/jira/browse/FOP-2809
Project: FOP
Issue Type: Bug
Components: layout/line
Affects Versions: 2.3
Reporter: Dan Caprioara
The text should be presented on two lines:
{quote}
line1 line1 line1 line1 LINE1
line2
{quote}
But is like this, on three lines.
{quote}
line1 line1 line1 line1
LINE1
line2
{quote}
The snippet:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xml:lang="en-us">
<fo:layout-master-set>
<fo:simple-page-master master-name="css2fo-default" page-width="8.5in" page-height="11in">
<fo:region-body margin="1in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="css2fo-default" force-page-count="no-force"
id="last-page-sequence" line-height-shift-adjustment="disregard-shifts">
<fo:flow flow-name="xsl-region-body">
<fo:block-container>
<fo:block linefeed-treatment="preserve" wrap-option="wrap"><fo:inline>line1 line1 <fo:inline>line1 line1 LINE1</fo:inline>
<fo:inline>line2</fo:inline></fo:inline></fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
{code}
If you add words to the example, you will see that it always add a break before the second-to-last word.
If you remove the inline: {{<fo:inline>line2</fo:inline>}} and leave just the {{line2}} text, this corrects the problem. The same if you remove the tags of any inline.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)