Repository navigation
Fullbleed 0.9.0: compiled document batches
Fullbleed 0.9.0 adds renderPdfBatch() for letters, notices, invoices, and statements that share a template. Compile once per request, supply plain-string records, and receive one PDF in record order with each record's page range.
npm install --save-exact fullbleed@0.9.0import { writeFile } from 'node:fs/promises';
import { renderPdfBatch } from 'fullbleed';
const result = await renderPdfBatch({
html: '<h1>Account {{account}}</h1><p>{{message}}</p>',
css: '@page { size: A5; margin: 18mm } h1 { color: #175c52 }',
records: [
{ account: '1042', message: 'Your account is up to date.' },
{ account: '1043', message: 'Your next review is scheduled for November.' },
],
});
await writeFile('notices.pdf', result.pdf);
for (const row of result.records) {
console.log(`Record ${row.recordIndex}: pages ${row.pageOffset + 1}–${row.pageOffset + row.pageCount}`);
}The default reflow layout lets longer records wrap onto additional pages. Choose layout: 'fixed' when values fit the compiled geometry. The API works with Node ESM/CommonJS, render queues, the browser renderer, and fullbleed/cloudflare.
Per-record reports identify characters missing from the selected registered font chain. Missing characters reject a batch by default; allowMissingGlyphs: true lets applications inspect the reports. Records contain literal text and must match the template's text fields. See the batch API and limits.
This release wraps published Fullbleed 2.5.46. It also hardens record snapshots and rejects malformed worker reports and child-process failures. Existing render APIs remain available. Component-authored templates can use the same batch API; the component authoring surface remains alpha.
The exact release tarball passed all 13 CI jobs: nine installed-package configurations on Linux, Windows, and macOS with Node 22/24/26, plus Chrome, Firefox, and Playwright WebKit. Seven batch fixtures and both actual README examples passed; Linux and Windows independently read nine PDFs totaling 19 pages. All 421 native/WASI fixture comparisons and existing rendering regression gates passed. Local workerd checks passed on Windows and Linux; hosted Workers deployment is not qualified by those checks.
The attached batch-reflow.pdf shows a two-record batch whose longer record takes four pages. release-verification.json and the verification ZIP retain the fixture-specific evidence. Character diagnostics are not accessibility, shaping, layout, or PDF conformance certification.
Source: 4f94363b7de7bf46f037c779809ad8bfd4d4bf15. Tarball SHA-256: 83aed411499affbeef0a4401dff09b254c532f5f970403836e82e72f8e10d472.