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

Issue with formatting the content to fit properly across the entire page. #724

Open
humashaaa opened this issue Oct 9, 2024 · 0 comments

Comments

@humashaaa
Copy link

humashaaa commented Oct 9, 2024

I would like the text and elements to evenly spread across the full A4-sized page, similar to how the content is distributed in the 1st image. In my current PDF output, the content doesn't take advantage of the full page space and appears more confined, much like the 2nd image and in live site my component looks like 3rd image

Here's my code :
const handlePdf = async() => { const element = document.getElementById('element'); const opt = { margin:0, filename: 'myResume.pdf', enableLinks: true, image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 3 }, jsPDF: { format: 'a4', orientation: 'portrait' } }; html2pdf().set(opt).from(element).save(); };

I want my pdf to look like this

Screenshot 2024-10-09 094727

This is how my pdf looks

Screenshot 2024-10-09 091700

That's how my component looks in live site

Screenshot 2024-10-09 091610

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