basalt / subscriptions-pdf/src / renderInvoicePdf
Function: renderInvoicePdf()
> renderInvoicePdf(invoice, options?): Promise<Buffer<ArrayBufferLike>>
Defined in: subscriptions-pdf/src/index.ts:21
Render a @basaltkit/subscriptions Invoice to a PDF Buffer with pdfkit — the printable counterpart of renderInvoiceHtml, from the same Invoice object. Kept in this satellite so the core stays dependency-free.
ts
const pdf = await renderInvoicePdf(invoice, { businessName: 'Acme Inc' })
await writeFile('invoice.pdf', pdf)Parameters
invoice
options?
InvoicePdfOptions = {}
Returns
Promise<Buffer<ArrayBufferLike>>