apply($doc); $doc->addPage(); $template->masthead($doc); $template->registerFaces($doc, [['Inter', 'B']]); // bill-to, totals row $body = <<<'HTML'

BILLED TO

Northwind Trading Co.

Attn: Accounts Payable
420 Market Street
Seattle, WA 98101
ap@northwind.example

INVOICE

NumberINV-2026-0042
Issued2026-07-13
Due2026-08-12
TermsNet 30
# Description Qty Unit price Amount
1NextPDF Pro license — annual subscription 2$299.00$598.00
2NextPDF Enterprise license — annual subscription 1$999.00$999.00
3Priority support — 12 months, 4-hour SLA 1$199.00$199.00
4Onboarding & integration workshop (remote) 1$450.00$450.00
Subtotal$2,246.00
Tax (8.5%)$190.91
Total due$2,436.91

Payment is due within 30 days. Please reference invoice INV-2026-0042 on all remittances. All amounts in USD.

HTML; $css = <<<'CSS' CSS; $doc->writeHtml(SampleTemplate::sharedCss() . $css . $body); $output = \getenv('NEXTPDF_SAMPLE_OUTPUT') ?: __DIR__ . '/../output/invoice.pdf'; $doc->save($output); echo "Created: {$output}\n";