我有一些内容在我的网页上,也有三个C3图,我正在使用jsPDF生成的pdf与图表。
我的代码:
$(function() {
$('#download_as_pdf').click(function() {
var pdf = new jsPDF('lanscape');
var options = { pagesplit: true,'background': '#fff' };
pdf.addHTML($('#customer_report_section'), options, function() {
pdf.save("mypdf.pdf");
});
});
});现在,它的工作精细和pdf正在生成,但PDF有5-6页,他们没有正确地打破。有谁知道我怎么做到的吗?
发布于 2017-06-20 23:07:57
我还没有看到任何正确工作的选项(请查看Github:https://github.com/MrRio/jsPDF/issues/944上的这个问题)
有一个包可以修复其中的一些问题,但我还没有尝试过:https://github.com/MrRio/jsPDF/issues/1176
我看到的最后一个选项是手动将内容分割成不同的页面,然后在每个页面之后添加一个页面,有点像这样:https://github.com/MrRio/jsPDF/issues/46#issuecomment-205510431
https://stackoverflow.com/questions/44538408
复制相似问题