Open Alex119793898 opened 3 years ago
my running code :
if(true){ var trArr = $('.process-option').find('tbody').children().toArray(); for(var k=0; k<trArr.length; k++){ trSum += trArr[k].clientHeight; if(trSum > 600){ trArr[k-1].classList.add('html2pdf__page-break'); break; } } }
var opt = { margin: [8,8,8,8], filename: getFileName(title)+'.pdf', pagebreak: { mode: ['avoid-all', 'css', 'legacy']}, image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2}, jsPDF: { unit: 'px', format: [500,600], orientation: 'portrait' } };
html2pdf(element[0], opt);
Anyone can give me some ideas?
my running code :
if(true){ var trArr = $('.process-option').find('tbody').children().toArray(); for(var k=0; k<trArr.length; k++){ trSum += trArr[k].clientHeight; if(trSum > 600){ trArr[k-1].classList.add('html2pdf__page-break'); break; } } }
var opt = { margin: [8,8,8,8], filename: getFileName(title)+'.pdf', pagebreak: { mode: ['avoid-all', 'css', 'legacy']}, image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2}, jsPDF: { unit: 'px', format: [500,600], orientation: 'portrait' } };
Anyone can give me some ideas?