XmlWorker不识别表格单元格上的边框底部.
这是我的密码:
<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>我正在使用这个官方工具进行测试:
http://demo.itextsupport.com/xmlworker/ (单击"html“按钮,在”字体大小“下,并粘贴代码)
我还在使用iTextSharp + MvcRazorToPdf (两个C#库)进行测试。
问题:
,我怎样才能让边框底部工作?
编辑:
根据这个兼容性摘要:http://demo.itextsupport.com/xmlworker/itextdoc/CSS-conformance-list.htm,css属性border-bottom应该可以很好地处理html元素td (cell)。
发布于 2014-12-21 11:59:47
在特定边界样式的情况下,XMLWorker不支持简写CSS属性。应支持全球财产“边界”。它看起来像是一致性列表中的一个错误。请使用属性全名代替:<td style="... border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: gray" ...>
https://stackoverflow.com/questions/27508605
复制相似问题