Commit graph

2 commits

Author SHA1 Message Date
Claude
f39eed979a
Replace browser print with jsPDF Helvetica PDF generation
The browser print-to-PDF approach requires the user to manually toggle
"Background graphics" on and "Headers and footers" off — impossible to
control programmatically. Replace with direct jsPDF generation:

- Loads jsPDF 2.5.1 UMD from CDN
- buildPDF() draws the invoice programmatically using Helvetica (PDF
  built-in font, no embedding needed)
- Layout: sender/title header, navy rule, charge-to block with navy
  accent bar, line-items table (navy header, alternating rows, multi-
  line description wrapping, foreign-currency sub-row), totals with
  navy To-Pay bar — all in mm on A4
- PDF downloads directly as invoice-{no}.pdf with no dialog
- HTML preview overlay retained for review before download
- Replace "print-invoice" config key with "download-pdf"

https://claude.ai/code/session_015iyCBgoTXNNqaErR287U1u
2026-05-19 07:52:40 +00:00
Claude
8bac41fe77
Build invoicing app: app/index.html and app/config.yml
Static single-page invoice app per spec. Features:
- Multilingual UI (EN/DE/FR/NO) loaded from config.yml; form always
  prints in the default language
- Sender fields + invoice details (date, project code, invoice no.)
  persisted in localStorage; invoice number auto-increments after
  each generation
- Predefined charge-to recipients selectable from config, or manual entry
- Dynamic invoice line items: predefined products with UOM/price
  pre-fill, free-text fallback, foreign-currency sub-row with
  exchange-rate and per-item price that calculates back to local currency
- Subtotal / tax (configurable rates) / paid / to-pay calculated live
- "Generate Invoice" renders a clean A4-formatted preview overlay;
  "Print / Save as PDF" triggers browser print-to-PDF

https://claude.ai/code/session_015iyCBgoTXNNqaErR287U1u
2026-05-18 18:03:48 +00:00