Decrease PDF invoice item row height by ~10% #5

Merged
odweta merged 1 commits from odweta-decrease-pdf-line-height into main 2026-09-10 17:27:36 +02:00
odweta commented 2026-09-10 17:22:37 +02:00 (Migrated from github.com)

Why

Item rows in the generated invoice PDF felt too spaced out. This tightens the line height of the items (položky) table by roughly 10%.

Approach

In renderInvoicePdf (app/src/app.js), the table header and item rows previously shared a single 25pt rowHeight. This split it into headerRowHeight (unchanged, 25pt) and itemRowHeight (22.5pt, a ~10% reduction), used for the item row background fill, the bottom divider line, and the row cursor advance. Cell text vertical offset within each item row was adjusted from 8pt to 6pt so it stays centered in the shorter row.

Notes

  • Only item rows are affected; the header row height and styling are untouched.
  • Verified with npm test (2/2 passing) and a Node syntax check.
## Why Item rows in the generated invoice PDF felt too spaced out. This tightens the line height of the items (položky) table by roughly 10%. ## Approach In `renderInvoicePdf` (`app/src/app.js`), the table header and item rows previously shared a single 25pt `rowHeight`. This split it into `headerRowHeight` (unchanged, 25pt) and `itemRowHeight` (22.5pt, a ~10% reduction), used for the item row background fill, the bottom divider line, and the row cursor advance. Cell text vertical offset within each item row was adjusted from 8pt to 6pt so it stays centered in the shorter row. ## Notes - Only item rows are affected; the header row height and styling are untouched. - Verified with `npm test` (2/2 passing) and a Node syntax check.
Sign in to join this conversation.