我正在尝试使用Rotativa将 html 转换为 PDF我正在将报告构建为 html 页面中的 svg 标记并将生成的视图传递给 Rotativa,它打印几乎所有内容,除了里面的内容(这里和
):
<svg style="display: block;margin-left: auto;margin-right: auto;" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.2" height="1453" width="1040" y="0" x="0">
<switch>
<foreignObject x="49" y="215" width="943" height="500" class="s2_2" requiredExtensions="http://www.w3.org/1999/xhtml">
<p style="line-height: 25px;">
Any words here
</p>
<table cellspacing="0" cellpadding="0" class="styled-table">
<tbody><tr>
<th class="s3_2">Full Name</th>
<th class="s3_2">Source</th>
<th class="s3_2">Date of Birth</th>
</tr>
<tr>
<td>Caroline Ashcrof</td>
<td>Lorem ipsum dolor</td>
<td>dd/mm/yyyy</td>
</tr>
<tr>
<td>Caroline Ashcrof</td>
<td>Lorem ipsum dolor</td>
<td>dd/mm/yyyy</td>
</tr>
<tr>
<td>Caroline Ashcrof</td>
<td>Lorem ipsum dolor</td>
<td>dd/mm/yyyy</td>
</tr>
</tbody></table>
</foreignObject>
</switch>
我将 rotativa 中的 wkhtmltopdf.exe 升级到最新版本(0.13),但没有成功。是否有将 html 转换为 PDF 的解决方案、解决方法或什至另一个模块。