使用html2canvas将HTML表格转换为画布(Convert HTML table to canvas using html2canvas)
我想将html表转换为pdf。 我尝试过使用jspdf。 它适用于普通表。 但是当表格中有图像时不起作用。 现在我试图至少转换为canvas,然后转换为pdf。 但是当有图像时它也无法工作。
button{
display:block;
height:20px;
margin-top:10px;
margin-bottom:10px;
}
window.takeScreenShot = function() {
html2canvas(document.getElementById("target"), {
onrendered: function (canvas) {
document.body.appendChild(canvas);
},
width:320,
height:220
});
}
saf | |
saff | wdqwewe |
to image
I am trying to convert html table to pdf. I have tried using jspdf. it w