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:
line1 line1 line1 line1 LINE1
But is like this, on three lines.
line1 line1 line1 line1

The snippet:

<?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:simple-page-master master-name="css2fo-default" page-width="8.5in" 
      <fo:region-body margin="1in"/>
  <fo:page-sequence master-reference="css2fo-default" 
    id="last-page-sequence" line-height-shift-adjustment="disregard-shifts">
    <fo:flow flow-name="xsl-region-body">
          <fo:block linefeed-treatment="preserve" 
wrap-option="wrap"><fo:inline>line1 line1 <fo:inline>line1 line1 

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

Reply via email to