diff --git a/pdf.js b/pdf.js index ac792fb..8d86310 100644 --- a/pdf.js +++ b/pdf.js @@ -207,7 +207,7 @@ COURSE_DESCRIPTION: cols[2].x + (cols[2].w - widths.COURSE_DESCRIPTION) / 2, TEACHER: cols[3].x + (cols[3].w - widths.TEACHER) / 2, UNITS: cols[4].x + (cols[4].w - widths.UNITS) / 2, - NOTE: cols[5].x + 3 + NOTE: cols[5].x + (cols[5].w - widths.NOTE) / 2 }; } @@ -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 just below the total, matching the reference. - 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);