Bug 49186

Summary: Empty fo:inline objects with id attribute generate blank line
Product: Fop - Now in Jira Reporter: Dwayne B. <dbb.1>
Component: generalAssignee: fop-dev
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 0.95   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Test cases which demonstrate the bug

Description Dwayne B. 2010-04-26 10:04:58 UTC
Created attachment 25355 [details]
Test cases which demonstrate the bug

As per the summary, fo:inline objects with no content and an id attribute (e.g. <fo:inline id="foo" />) will render a blank space; this should not occur. Please see the example test cases and the PDFs generated by Apache FOP 0.95 that are in the attached zip file.

I am fairly certain this is related to the resolution of this bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=42748 and this revision: http://svn.apache.org/viewvc?view=revision&revision=591437

Thanks.
Comment 1 Dwayne B. 2010-06-01 13:38:29 UTC
Anyone taking a look at this?
Comment 2 Andreas L. Delmelle 2011-01-07 12:18:10 UTC
Not immediately dismissing this, but it did get me wondering which situation is wrong.
FOP does not generate an area for empty inlines if they have no id or markers that should be tracked, which is why there is a difference between the two cases.
Now, if we have:

<fo:block white-space-treatment="preserve">
  <fo:block>There should be a blank line between this block</fo:block>
  <fo:block>and this block</fo:block>
</fo:block>

The output is rendered, as expected, with a line in between both blocks containing only a single space character.

Same without white-space preservation, but only a zero-width space

<fo:block>
  <fo:block>There should be a blank line between this block</fo:block>
  &#x200B;
  <fo:block>and this block</fo:block>
</fo:block>

Checking http://www.w3.org/TR/xsl/#area-inline, it seems like even empty inlines are in fact supposed to generate an area (= content/allocation rectangle), regardless of whether an id or marker is present (?). If that is so, then /that/ would be the case that needs fixing, contrary to what the bug description indicates.

The only way to really avoid that spurious blank space, would be to set the font-size of the empty inline to 0pt.
Comment 3 Glenn Adams 2012-04-07 01:44:46 UTC
resetting P2 open bugs to P3 pending further review