@zenuinebit/invoice-pdf
v0.1.0
Published
Generate invoice PDFs in Node. No browser required.
Readme
@zenuinebit/invoice-pdf
Node-only PDF generation for @zenuinebit/invoice data. No browser or headless Chrome needed.
import { writeFile } from "node:fs/promises";
import { renderInvoicePDF } from "@zenuinebit/invoice-pdf";
const pdf = await renderInvoicePDF(invoice, { pageSize: "A4", logo: "./logo.png" });
await writeFile("invoice.pdf", pdf);Fonts. The built-in Helvetica covers Latin-1 only. Without a custom font, currencies whose symbol falls outside Latin-1 (e.g. ₹) are printed with their ISO code (INR 1,000.00). For other scripts in names or descriptions, or to print ₹, pass a TTF/OTF via font (and optionally fontBold), such as Noto Sans.
