分页
var pdf = new jsPDF('p', 'pt', 'a4');
var options = {
pagesplit: true
};
pdf.addHTML($(".pdf-wrapper"), options, function()
{
pdf.save("test.pdf");
});
递归
function printbypage(pdf, k){
if(k >= $('.my_show').length)
{
pdf.output('dataurlnewwindow');
}
pdf.addHTML($('.my_show')[k], function(){
if(k < $('.my_show').length - 1)
{
pdf.addPage();
}
printbypage(pdf, k + 1);
});
};
function printmyshow() {
var pdf = new jsPDF('p', 'mm', 'a4');
printbypage(pdf, 0);
};