spo*_*rts 7 itext itextsharp xmlworker mvcrazortopdf
XmlWorker无法识别表格单元格上的border-bottom.
这是我的代码:
<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>
Run Code Online (Sandbox Code Playgroud)
我正在使用这个官方工具进行测试:
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)
在特定于边的特定边框样式中,XMLWorker不支持速记CSS属性.应支持全球财产"边界".它看起来像是一致性列表中的拼写错误.请使用属性全名:
<td style="... border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: gray" ...>
| 归档时间: |
|
| 查看次数: |
4616 次 |
| 最近记录: |