Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why html2pdf when i have too long data it's not create page more than 1 #718

Open
TanonchaiSrikawe opened this issue Aug 28, 2024 · 0 comments

Comments

@TanonchaiSrikawe
Copy link

$(document).ready(function() {
$('#printSheetPO').on('click', function() {
startLoading();
let source = window.document.getElementById("sheetPO").innerHTML;
const opt = {
margin: 0.25,
filename: 'sheetPO.pdf',
image: {
type: 'jpeg',
quality: 1
},
html2canvas: {
scale: 2,
width: 8.27 * 96,
height: 11.69 * 96,
},
jsPDF: {
unit: 'in',
format: 'a4',
orientation: 'portrait',
},
};
html2pdf().set(opt).from(source).save().output('dataurlnewwindow').then(function() {
stopLoading();
});
});
});

@github-staff github-staff deleted a comment Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant