[ https://issues.apache.org/jira/browse/FOP-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16924248#comment-16924248 ]
simon steiner commented on FOP-2809: ------------------------------------ Can you attach as a patch file > 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 > Priority: Major > > The text should be presented on two lines (they are separated by line breaks > - not by wrapping - is plenty of space in the page): > {quote} > line1 line1 line1 line1 LINE1 > line2 > {quote} > Instead it is 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 more 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 (v8.3.2#803003)