White space under a PDF after his generation in landscape mode
Opened this issue · 3 comments
Hello everyone,
I'm writing this message after a problem encountered while creating a pdf with html2pdf.
To answer a need of one of our clients, we create the template of a pdf in css, then "take a snapshot" and create the pdf with html2pdf and jsPDF.
I portrait mode, there is no problem, but when you create a pdf in landsccape mode, a white area of about 50 pixels at the bottom of the file, and every element coming in this element is transfered to a second page (which we don't want, we only want one page).
The options are
const option = {
filename: titredoc,
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'
}
};
For the landscape mode, and
const option = {
filename: titredoc,
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'
}
};
For the portrait mode. As you can see, not a lot changed, but the problem is present.
DO you have a solution for this issue ?
Hey, it's been a week. Nobody have seen this issue ?
Is this library unsupported ?
Two weeks later and still nothing ?