Skip to content
v2.7 (latest)

Configure PDF settings ​

This guide explains how to configure the PDF settings that control how the form looks when rendered as a PDF (via PDF.renderForm()). They configure the paper layout, margins, and custom header/footer HTML.

SettingDescriptionDefault
FormatPaper sizeA4
LandscapePortrait or landscape orientationPortrait (off)
ScaleZoom level of the rendered page (0.1–2)1
Margin top / right / bottom / leftPage margins (numbers or CSS units like 1cm, 10px)30 / 35 / 70 / 25
Header templateHTML for the page header (printed on every page)—
Footer templateHTML for the page footer (printed on every page)—

Header and footer templates are HTML strings. Use the following CSS classes to inject dynamic print values:

ClassValue injected
dateFormatted print date
titleDocument title
urlDocument URL
pageNumberCurrent page number
totalPagesTotal number of pages

Create a PDF:

  1. Go to tab Settings
  2. Click on Set default footer under Footer template (default code for page number appears)
  3. Go to tab Definition
  4. Click on the + Element button and add an element of type Header
  5. Set its Label to Print
  6. Click on the + Element button and add an element of type Button
    1. Set its Label to PDF
    2. On click actions: select Print form to PDF and select the current form
  7. Save the Ruleset
  8. Click on Preview
  9. Click on the PDF button