-
-
Notifications
You must be signed in to change notification settings - Fork 638
Correct height calculation in the sections #1105
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
base: main
Are you sure you want to change the base?
Conversation
recalculate the dimensions of the sections to return their exact size if you have to use rowSpan in head or foot or both since otherwise it increases the virtual size of the table and creates a new page before you have arrived has occupied the space established in the margins of the sheet.
|
import { jsPDF } from "jspdf"; applyPlugin(jsPDF); const doc = new jsPDF({ for (let i = 0; i < 41; i++) { body.push(r); ] function columnStyles(d, w) { for (let i = 0; i < d; i++) { export default doc; Si ejecutas este código con el código original la página se rompe antes de las 41 filas si no me equivoco por lo menos las 3 últimas filas se van a la página siguiente por el error de cálculo de la altura de las secciones |
|
if you count the number of rows in the body you will realize that it is the same amount but the result completely different. |
|
By the way this error is fixed pull request #1106 |



This code corrects the calculation of the height of the sections when using rowSpan in them since the original code oversized the height of the sections with the dimension of the rows that do not have rowSpan which causes an anticipated page break.