IText XmlWorker does not recognize border-bottom on table cell

XmlWorker does not recognize border-bottom in a table cell.

This is my code:

<table> <tbody> <tr> <th style="width: 20%; height: 40px; vertical-align: top; border-bottom: 1px solid gray">Your name</th> <td style="width: 80%; border-bottom: 1px solid gray"></td> </tr> <tr> <th style="height: 40px; vertical-align: top; border-bottom: 1px solid gray">Your lastname</th> <td style="border-bottom: 1px solid gray"></td> </tr> </tbody> </table> 

I am testing this official tool:
http://demo.itextsupport.com/xmlworker/ (Click the "html" button in the "Font Size" section and paste the code)

I am also testing iTextSharp + MvcRazorToPdf (two C # libraries).

Question:
How can I make border-bottom work?

Edit:
According to this compatibility summary: http://demo.itextsupport.com/xmlworker/itextdoc/CSS-conformance-list.htm , the css border-bottom property should work fine with the html td ( cell ) element

+6
source share
1 answer

XMLWorker does not support shorthand CSS properties for third-party border styles. It is necessary to maintain global ownership of "frontier." This is like a typo in the match list. Use the full property names instead: <td style="... border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: gray" ...>

+8
source

Source: https://habr.com/ru/post/979710/


All Articles