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] White space at the bottom of the PDFs #3803

Open
thm-meder opened this issue Dec 5, 2024 · 0 comments
Open

[Issue] White space at the bottom of the PDFs #3803

thm-meder opened this issue Dec 5, 2024 · 0 comments

Comments

@thm-meder
Copy link

I have read and understood the contribution guidelines.

Hello everyone,

I'm contacting you today to enquire about an issue I'm encountering for some days now.
I generate two pdf : in landscape and in portrait, but each generation create a white space under the pdf. For the landscape one, the margin is about 50 pixels if not more. For the portrait, its 1 pixel.

The problem is, if I change the size of the PDF or the section of what I want to turn into a pdf, everything breaks and "go" to a second page (a second page is created for the pdf, but nothing is on it). Do you have any idea on how to resolve this issue ?

The options used on the landscape mode, for an section that is 1200*1700 in size are

const option = {
filename: doctitle,
margin: 0,
image: {
type: 'jpeg',
quality: 7
},
pagebreak: {
mode: 'avoid-all'
},
html2canvas: {
type: 'view',
dpi: 300,
scale: 7,
quality: 3,
letterRendering: true,
useCORS: true
},
jsPDF: {
unit: 'px',
format: [1701, 1180],
orientation: 'p'
}
};

And the options used on the landscape mode, for an section that is 1760*1130, are :

const option = {
filename: doctitle,
margin: 0,
image: {
type: 'jpeg',
quality: 1
},
pagebreak: {
mode: 'avoid-all'
},
html2canvas: {
dpi: 300,
scale: 4,
letterRendering: true,
useCORS: true
},
jsPDF: {
unit: 'px',
format: [1170, 1750],
orientation: 'l'
}
};

Thank you very much for your time and for your help !

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