您知道如何将HTML转换为带图像的PDF(JPG / PNG)吗? 我尝试使用jsPDF但只转换没有图像的文本:(
代码:
<!--
content of this area will be the content of your PDF file
-->
<div id="HTMLtoPDF">
<table>
<thead>
<tr>
<th>#</th>
<th>First Name</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
</tr>
</tbody>
</table>
</div>
<!-- here we call the function that makes PDF -->
<a href="#" onclick="HTMLtoPDF()">Download PDF</a>
<!-- these js files are used for making PDF -->
<script src="js/png.js"></script>
<script src="js/addimage.js"></script>
<script src="js/jspdf.js"></script>
<script src="js/jquery-2.1.3.js"></script>
<script src="js/pdfFromHTML.js"></script>
你是什么意思?我想创建发票