Forma PDF

Automatic PDF page breaks for text and tables

By WVSTECH · Reviewed November 23, 2026 · Examples target SDK 0.4.0

Forma PDF can paginate growing text and tables when automatic page breaks are enabled. The output is not restricted to the one page visible in a starter template: document content can produce additional pages.

Enable automatic page breaks

const paginatedLayout = {
  ...savedLayout,
  page: { ...savedLayout.page, automaticPageBreaks: true }
}
const document = await resolveDocument(paginatedLayout, values)
console.log(document.pages.length)
const pdf = await generatePDF(paginatedLayout, values)

Respect the paper dimensions

Field positions and sizes are in millimeters. An A4 portrait page is 210 × 297 mm; Letter and landscape are also supported. A field positioned outside its source page is an invalid layout, not a request for another page. Place fields inside the paper bounds and let supported content overflow create continuation pages.

Long tables and repeated content

Tables can continue across pages with repeated column headers. Brand and page settings can reserve room for recurring headers and footers. Test both short and long real-world records because row height changes with text length.

resolveDocument returns the calculated page plan. Store the original template, then recalculate with each new values object. The browser still needs enough memory for the requested document; multi-page support is not a promise of unlimited resource usage.

Continue building

Try the visual editor View the SDK license