From e6249ae330e464486366f7a45ea3f482e74d4967 Mon Sep 17 00:00:00 2001 From: adrianbonpin Date: Wed, 19 Aug 2026 00:52:32 +0800 Subject: [PATCH] fix: draw total underline above the total --- pdf.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdf.js b/pdf.js index 8d86310..06283ef 100644 --- a/pdf.js +++ b/pdf.js @@ -329,9 +329,9 @@ // Total sits under the UNITS column, right-aligned within it. const unitsCol = cols[4]; const w = bold.widthOfTextAtSize(data.totalUnits, 8); + // Short underline above the total, spanning the UNITS column. + hline(unitsCol.x, unitsCol.x + unitsCol.w, y + 2); page.drawText(data.totalUnits, { x: unitsCol.x + unitsCol.w - w, y, size: 8, font: bold, color: black }); - // Short underline below the total, spanning the UNITS column. - hline(unitsCol.x, unitsCol.x + unitsCol.w, y - 2); y -= 12; } hline(margin, margin + contentWidth, y);