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

pdf images are not visible in pdf #697

Open
apoorv28 opened this issue Jun 7, 2024 · 0 comments
Open

pdf images are not visible in pdf #697

apoorv28 opened this issue Jun 7, 2024 · 0 comments

Comments

@apoorv28
Copy link

apoorv28 commented Jun 7, 2024

async newExportToPdf(element: HTMLElement, pdfName: string, calculatedHeight) {
//var element = document.getElementById('exportthis');
element.style.display = 'block'
let options = {
margin: [22, 10, 15, 10], //top, left, buttom, right
filename: 'Gantt.pdf',
image: { type: 'jpeg', quality: 1 },
html2canvas: { scrollX: 0, scrollY: 0 },
jsPDF: { unit: 'pt', format: 'A4', orientation: 'portrait' },
}
setTimeout(function () {
html2pdf().from(element).set(options).to('pdf').get('pdf').save()
}, 50);
}
images in pdf is cropped , can anyone help with this?

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