Generates a paged A4 invoice and a single-page receipt from the same fake data, using takumi-pdf.
Build the wasm package first (needs Rust and wasm-pack):
cd takumi-pdf-js
bun run buildThen run the example:
cd example/generate-invoice
bun index.tsxOpen output/invoice.pdf and output/receipt.pdf to see the results.
The invoice uses the paged mode: content flows across A4 pages, and the footer repeats with pageNumber / totalPages counters. The receipt uses viewport for a fixed 80mm-style single page.