Anchor PDF payment card to footer and size QR to payment lines #4

Merged
odweta merged 1 commits from odweta-align-pdf-payment-footer into main 2026-09-10 17:07:04 +02:00
odweta commented 2026-09-10 17:06:29 +02:00 (Migrated from github.com)

Why

The QR code and payment details (account number, IBAN, SWIFT) sat right below the invoice total, disconnected from the bottom of the page, and the QR code used an arbitrary fixed size that didn't relate to the surrounding text.

What changed

  • The payment info card is now anchored to the bottom margin of the page, so it reads as a proper footer alongside the QR code.
  • The QR code width/height is now derived from the combined height of the three payment lines (account number, IBAN, SWIFT) instead of a hardcoded 145pt, keeping it visually aligned with the text it accompanies.

Notes for reviewers

  • Verified with the existing Jest suite (npm test), which passed.
  • No changes to invoice data/QR payload logic, only layout/positioning in renderInvoicePdf.
## Why The QR code and payment details (account number, IBAN, SWIFT) sat right below the invoice total, disconnected from the bottom of the page, and the QR code used an arbitrary fixed size that didn't relate to the surrounding text. ## What changed - The payment info card is now anchored to the bottom margin of the page, so it reads as a proper footer alongside the QR code. - The QR code width/height is now derived from the combined height of the three payment lines (account number, IBAN, SWIFT) instead of a hardcoded 145pt, keeping it visually aligned with the text it accompanies. ## Notes for reviewers - Verified with the existing Jest suite (`npm test`), which passed. - No changes to invoice data/QR payload logic, only layout/positioning in `renderInvoicePdf`.
Sign in to join this conversation.