Invoice PDF
doc_invoiceGenerate a clean A4 invoice PDF with business and client details, line items, discounts, taxes, computed totals, notes, terms, and an optional PAID stamp.
Instructions
Make a clean A4 invoice PDF: your business (logo, name, address, email, phone, tax ID), client, invoice number and dates, line items with quantity, unit price, per-line discount % and tax %, subtotal, discount, tax per rate and total, notes, payment terms, and an optional PAID stamp. Same maths as the website: every line is rounded to the currency's minor unit (2 decimals, 3 for JOD/KWD/BHD/OMR/TND…, 0 for JPY…) with half-up rounding; amounts formatted en-US style ($1,234.50, JOD 10.124). Long item lists continue on more pages. Returns the PDF path and the computed totals. Latin text only for now. Web version: https://s3eidat.github.io/invoice-maker/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | The client (bill to): name, email, address. | |
| due | No | Due date, YYYY-MM-DD (optional). | |
| date | No | Issue date, YYYY-MM-DD (default today). | |
| from | No | Your business: name, email, phone, address, taxId. | |
| logo | No | Optional logo image: a PNG/JPEG/WebP/GIF/SVG file path or base64. Drawn as-is (keep it small). | |
| paid | No | Mark as paid (shows "Amount paid" and a PAID stamp). | |
| items | Yes | Line items: desc, qty, price, disc %, tax %. | |
| notes | No | Notes shown at the bottom. | |
| terms | No | Payment terms shown at the bottom. | |
| accent | No | Accent colour (hex). | #0e9f9a |
| number | No | Invoice number. | INV-0001 |
| output | No | Where to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set). | |
| currency | No | Currency code. | USD |
| returnBase64 | No | Also return the output as base64 in the result (only for small files). Default false. |