fix(pdf): fix missing logo/images and irregular table row heights in pdf generation
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2736,8 +2736,8 @@ function drawTableChunked(args: {
|
|||||||
|
|
||||||
// Dense table style (more columns, compact typography)
|
// Dense table style (more columns, compact typography)
|
||||||
// IMPORTANT: header labels must stay on a single line (no wrapped/stacked headers).
|
// IMPORTANT: header labels must stay on a single line (no wrapped/stacked headers).
|
||||||
const headerH = dense ? 16 : 16;
|
const headerH = 16;
|
||||||
let rowH = dense ? 16 : 16; // Increased to prevent row overlap
|
let rowH = 14; // Strict row height constraint so tables look identical vertically
|
||||||
let bodyFontSize = dense ? 6.5 : 8;
|
let bodyFontSize = dense ? 6.5 : 8;
|
||||||
let headerFontSize = dense ? 6.5 : 8;
|
let headerFontSize = dense ? 6.5 : 8;
|
||||||
|
|
||||||
@@ -2876,7 +2876,7 @@ function drawTableChunked(args: {
|
|||||||
if (isDenseManyColumns) {
|
if (isDenseManyColumns) {
|
||||||
bodyFontSize = Math.max(5.3, Math.min(bodyFontSize, 5.8));
|
bodyFontSize = Math.max(5.3, Math.min(bodyFontSize, 5.8));
|
||||||
headerFontSize = Math.max(5.1, Math.min(headerFontSize, 5.5));
|
headerFontSize = Math.max(5.1, Math.min(headerFontSize, 5.5));
|
||||||
rowH = Math.max(9, Math.min(rowH, 10));
|
// Leave rowH unchanged so table stripes remain visually consistent across pages
|
||||||
cellPadX = 3;
|
cellPadX = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3095,7 +3095,7 @@ function drawTableChunked(args: {
|
|||||||
// Don't truncate - use auto-fit widths to ensure everything fits
|
// Don't truncate - use auto-fit widths to ensure everything fits
|
||||||
page.drawText(noWrap(txt), {
|
page.drawText(noWrap(txt), {
|
||||||
x: x + cellPadX,
|
x: x + cellPadX,
|
||||||
y: y - (rowH - 5), // Adjusted for new rowH of 16
|
y: y - (rowH / 2 + bodyFontSize / 2 - 1), // Center vertically in row
|
||||||
size: bodyFontSize,
|
size: bodyFontSize,
|
||||||
font,
|
font,
|
||||||
color: darkGray,
|
color: darkGray,
|
||||||
|
|||||||
Reference in New Issue
Block a user