Bug 46251

Summary: space-end on <inline> throws off formatting in pdf
Product: Fop - Now in Jira Reporter: pilcme
Component: pdfAssignee: fop-dev
Status: NEW ---    
Severity: minor    
Priority: P3    
Version: 0.95   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: FO File that also has formatting problems; no-break spaces also involved

Description pilcme 2008-11-20 10:26:51 UTC
When a block begins with an <inline> and the <inline> has a space-end attribute, the first line of the block is badly formatted in pdf. 

The first line is longer than it should be by the amount of the space-end.

I have not tried any other output besides pdf.

This also happened on 0.94. I have not tried it on any older version and I have not tried in on the current trunk.

I am attaching an FO file. If you generate a pdf from this FO you should see the problem.

Note that my block has text-align="justify". This makes the problem easier to see but the problem remains without the text-align.
Comment 1 Andreas L. Delmelle 2008-11-21 11:07:14 UTC
Preliminary check of the code in InlineLM shows that space-end for fo:inlines is only taken into account when adding the areas, not yet when the element-list is generated, hence why the line-layout algorithm is tricked into believing that that break is OK.

I already have the beginnings of a patch ready here, which fixes the issue by adding the necessary boxes to the element-list, but it's still too rough to apply. It only takes into account the .optimum component, and besides that, I'm going to see if at the same time, I can implement space-resolution in that context...

TBC
Comment 2 Eric Amick 2009-02-18 05:09:40 UTC
Created attachment 23276 [details]
FO File that also has formatting problems; no-break spaces also involved
Comment 3 Glenn Adams 2012-04-07 01:44:56 UTC
resetting P2 open bugs to P3 pending further review
Comment 4 Glenn Adams 2012-04-11 06:17:01 UTC
change status from ASSIGNED to NEW for consistency