0

我已经在 shell 脚本中编写了 html 并将该输出保存到 output.html,我想将该 output.html 转换为 output.pdf 和 output.json 怎么做?

<table class="table table-sm">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td colspan="2">Larry the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
4

1 回答 1

1

要将文件转换为 PDF,您可能需要安装该实用程序

按照此链接完成此操作

一旦你安装了相同的,使用提到的链接运行这个

 html2pdf filename
于 2020-05-06T19:05:35.147 回答