Bug 45152 - Solid bottom border not rendered correctly since 0.94
Summary: Solid bottom border not rendered correctly since 0.94
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: trunk
Hardware: Sun Solaris
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-06 13:21 UTC by Alfred Nathaniel
Modified: 2012-04-01 06:43 UTC (History)
0 users



Attachments
FO input to demonstrate the problem (3.58 KB, application/fo)
2008-06-06 13:26 UTC, Alfred Nathaniel
Details
PDF rendered with fop-0.93 (5.41 KB, application/pdf)
2008-06-06 13:27 UTC, Alfred Nathaniel
Details
PDF rendered with fop-0.94 (5.64 KB, application/pdf)
2008-06-06 13:27 UTC, Alfred Nathaniel
Details
PDF rendered with fop-0.95beta (5.77 KB, application/pdf)
2008-06-06 13:28 UTC, Alfred Nathaniel
Details
FO input for other testcase (2.90 KB, text/x-xslfo)
2008-06-08 15:48 UTC, Alfred Nathaniel
Details
PDF output of 0.95beta (5.58 KB, application/pdf)
2008-06-08 15:49 UTC, Alfred Nathaniel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alfred Nathaniel 2008-06-06 13:21:26 UTC
In 0.93, the solid borders of table cells were still rendered okay in PDF output (except for the tiny gaps where the lines join).

In 0.94, there are squares of half the line width missing in the lower left and right corners of the row.

In 0.95beta, in addition to the corner problem, also the bottom line is drawn only with half width if stack above a row with different col-spans.

The problem is still in trunk (r663939).

Attached are a sample stylesheet and the results for the tagged versions,
Comment 1 Alfred Nathaniel 2008-06-06 13:26:51 UTC
Created attachment 22088 [details]
FO input to demonstrate the problem
Comment 2 Alfred Nathaniel 2008-06-06 13:27:33 UTC
Created attachment 22089 [details]
PDF rendered with fop-0.93
Comment 3 Alfred Nathaniel 2008-06-06 13:27:59 UTC
Created attachment 22090 [details]
PDF rendered with fop-0.94
Comment 4 Alfred Nathaniel 2008-06-06 13:28:22 UTC
Created attachment 22091 [details]
PDF rendered with fop-0.95beta
Comment 5 Andreas L. Delmelle 2008-06-06 13:39:16 UTC
No clue yet what the fix is, but it has to do with the implementation for border-collapse="collapse", which was added as of 0.94.

For now, I can already offer a workaround. If you specify explicit border-collapse="separate" on the fo:table, then the behavior will at least be identical to what 0.93 produced.
Comment 6 Vincent Hennebert 2008-06-07 02:33:17 UTC
Hi,

Indeed this is due to the implementation of the collapsing border model (the same as in CSS, if that gives you any hint), that's available since version 0.94 of FOP. When the border-collapse property is not specified on fo:table, its default value is "collapse". FOP 0.93 was actually not compliant on this regard since it was (silently) switching to the separate border model.

The behaviours of FOP 0.94 and 0.95 are normal and to be expected with the collapsing model. If this is not what you want then you just have to specify border-collapse="separate" on the table, like Andreas said. Both models allow to achieve quite different effects, so the one that suits you will depend on your needs.

HTH,
Vincent
Comment 7 Alfred Nathaniel 2008-06-08 15:44:09 UTC
Thanks for the hint.  border-collapse="separate" does indeed restore the 0.93 behaviour and produces the effect I actually need to produce (drawing a solid line with constant thickness between table rows with different col-span cells.

I am not a CSS-lawyer that I don't want to judge whether the missing corners starting in 0.94 are to be expected.

But I don't think that the 0.95beta behaviour to make the bottom-border width depend on the col-spans of the next row is normal.  Furthermore, it depends whether the bordered row is the first one or not.

I am attaching another testcase to illustrate that.
Comment 8 Alfred Nathaniel 2008-06-08 15:48:24 UTC
Created attachment 22096 [details]
FO input for other testcase

Example with one table of

    1.) bordered
    2.) unbordered

and another table of

    1.) unbordered
    2.) bordered
    3.) unbordered

With 0.95beta, the bottom-border of the cells in the bordered row are rendered differently.
Comment 9 Alfred Nathaniel 2008-06-08 15:49:04 UTC
Created attachment 22097 [details]
PDF output of 0.95beta
Comment 10 Vincent Hennebert 2008-06-09 03:23:37 UTC
Hi,

(In reply to comment #7)
> Thanks for the hint.  border-collapse="separate" does indeed restore the 0.93
> behaviour and produces the effect I actually need to produce (drawing a solid
> line with constant thickness between table rows with different col-span cells.
> 
> I am not a CSS-lawyer that I don't want to judge whether the missing corners
> starting in 0.94 are to be expected.

Actually this is a corner case that's not well described by the CSS spec. Web browsers seem to fill the corners while you can find both behaviours among XSL-FO implementations. I think most of the people who are using this model specify the same borders on all the cells of the table. Then the issue doesn't even show up.


> But I don't think that the 0.95beta behaviour to make the bottom-border width
> depend on the col-spans of the next row is normal.  Furthermore, it depends
> whether the bordered row is the first one or not.

Right, there's a bug in 0.95beta that was fixed in rev. 653537:
http://svn.apache.org/viewvc?view=rev&revision=653537
The fix will be available with the final version of FOP 0.95, that will be released soon. Thanks for the testcase, though.

Vincent
Comment 11 Glenn Adams 2012-04-01 06:43:31 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed