danfickle/openhtmltopdf

Table borders are partly transparent

ralleman opened this issue · 3 comments

I have two neighbouring table cells with the border set to 4px between them. Irrespective of whether I set the border on the left cell or the right cell, or on both cells, half the border width becomes transparent.

In the example below, I applied the border to both cells and you can see that there are two transparent "halves" of the border.

image

Another, perhaps related issue I'm finding, but I can work around it, is that the vertical borders of table cells don't seem to have the same size as horizontal ones using the same border-width (they're visually wider than the horizontal ones). On divs, this isn't the case. horizontal and vertical borders on divs seem visually equal.

Hi @ralleman,

Have you used border-collapse: collapse on the table? Also, you might run into #291 and #169.

Hi @danfickle,

Here are the styles on the table element:

image

And the left cell:

image

And the right cell:

image

Perhaps it's related to #291, but it's a different symptom though.

Hi @ralleman,

Thanks for the extra information. I was able to reproduce the problem and push a fix. It turns out the problem wasn't the borders themselves, but the background coverage when using collapsed borders.

It is now using the correct background coverage, so I'll close this issue. Thank you for reporting it.