Open YoelEigner opened 1 year ago
I am having the same issue, unfortunately. Did you ever find a solution?
No. Im still having this issue, it doesn't happen often but it happens 🥲
@callihann dis you find a solution? I keep running into this and i need a fix urgently
Hey @YoelEigner, I was never able to find a definite fix. However, I used a workaround that detected the height of the page and added a new page if necessary. This fix is fairly rudimentary but worked for my use case.
if (doc.y > 0.8 * doc.page.height) {
doc.addPage();
}
Thanks @callihann, I'm using that as well but it doesn't work 100% of the time for some reason
I'm having some issues with overlapping tbales, I saw some other folks having similar issues but this seems different and the fixes in those posts don't work.
The applied Payments Total should be after the applied payments table not on top. I did add
if (doc.y > 0.8 * doc.page.height) { doc.addPage() }
each time before i create a new table to make sure they don't overlap but in a few instances they still doThis is my table creation
if (doc.y > 0.8 * doc.page.height) { doc.addPage() } showappliedPaymentsTotalTable && await doc.table(totalAppliedPaymentsTable, { prepareHeader: () => doc.font("Helvetica-Bold").fontSize(8), prepareRow: (row, indexColumn, indexRow, rectRow, rectCell) => { virticalLines(doc, rectCell, indexColumn) indexColumn === 4 && doc.addBackground(rectCell, 'red', 0.15); doc.font("Helvetica").fontSize(8); }, });
and this is this the table that is making issues
title: "Applied Payments Total", subtitle: "From " + date.start + " To " + date.end, headers: [ { label: "Client Payments", renderer: null, align: "center" }, { label: "Client Hours", renderer: null, align: "center" }, { label: "Payments From Supervisee's clients", renderer: null, align: "center" }, { label: "Hours From Supervisee's clients", renderer: null, align: "center" }, { label: "Adjustment Fees", renderer: null, align: "center" }, { label: "Total Applied Payments", renderer: null, align: "center" } ], rows: [[ formatter.format(clientPayments), clientHours.toFixed(0), formatter.format((superviseeClientsPayment - totalAppliedAmount) + totalSupPracAmount), superviseeClientsHours.toFixed(0), formatter.format(ajustmentFeesTotal), formatter.format(total), ]],