Fix item separator line position; item name bold all-caps

- Accent separator line moved to y+lh (one line-height above text
  baseline) so it sits cleanly above the ITEM/PROJECT/TRAVEL label
  instead of cutting through it
- Item name rendered bold and uppercased
This commit is contained in:
Claude 2026-05-24 18:55:49 +00:00
parent 92760dffca
commit f1d1ae71ee
No known key found for this signature in database

View file

@ -955,13 +955,13 @@ async function generatePDF() {
state.items.forEach((item, itemIdx) => {
// Item header
needSpace(lh * 6); // need room for at least header + one line
if (itemIdx > 0) pg.drawLine({start:{x:M.left, y:y+3}, end:{x:M.left+W, y:y+3}, thickness:0.75, color:accent});
if (itemIdx > 0) pg.drawLine({start:{x:M.left, y:y+lh}, end:{x:M.left+W, y:y+lh}, thickness:0.75, color:accent});
pg.drawText('ITEM / PROJECT / TRAVEL', {x:M.left, y, size:sz, font:fontBold, color:accent});
const subStr = `Subtotal: ${baseCur} ${fmtAmt(item._subtotal)}`;
const subW = fontBold.widthOfTextAtSize(subStr, sz);
pg.drawText(subStr, {x:M.left+W-subW, y, size:sz, font:fontBold, color:accent});
y -= lh;
pg.drawText(item.name, {x:M.left, y, size:sz, font:fontBody, color:black});
pg.drawText((item.name||'').toUpperCase(), {x:M.left, y, size:sz, font:fontBold, color:black});
y -= lh + 4;
// Lines