Skip to main content
The Settings panel (left side of the editor) controls how your PDF is generated.

Template Name

The display name for your template. This appears in:
  • Templates list
  • File details (when generated from this template)
  • API responses
Best practices:
  • Use descriptive names: “Monthly Invoice”, “Shipping Label 4x6”
  • Include version or variant: “Contract v2”, “Receipt (Dark Theme)“

Output Name

Define the filename for generated PDFs using Handlebars variables:
Invoice-{{invoiceNumber}}-{{formatDate date "YYYY-MM-DD"}}
With test data {"invoiceNumber": "INV-001", "date": "2024-12-15"}, this produces:
Invoice-INV-001-2024-12-15.pdf
Available variables:
  • Any field from your templateData
  • All Handlebars helpers (formatDate, currency, etc.)
The .pdf extension is added automatically. Don’t include it in your output name.
Toggle whether background colors and images are included in the PDF.
SettingBehavior
EnabledBackground colors, gradients, and images are rendered
DisabledOnly foreground content is rendered (saves ink for printing)
Default: Enabled

Orientation

OptionDimensions
PortraitTaller than wide (default)
LandscapeWider than tall

Paper Size

Select from standard paper sizes:
SizeDimensions (mm)Common Use
A4210 × 297International standard
Letter216 × 279US standard
Legal216 × 356US legal documents
A3297 × 420Large format
A5148 × 210Booklets, flyers
A6105 × 148Postcards
Tabloid279 × 432Newspapers
Ledger432 × 279Spreadsheets
CustomUser-definedSpecial sizes

Custom Size

When “Custom” is selected, specify dimensions in millimeters:
  • Width — Page width in mm
  • Height — Page height in mm
Example custom sizes:
  • Shipping label (4” × 6”): 102 × 152 mm
  • Business card: 89 × 51 mm
  • Square: 200 × 200 mm

Margins

Set page margins in millimeters:
MarginDescription
TopSpace above content
RightSpace on right edge
BottomSpace below content
LeftSpace on left edge
Default: 10mm on all sides

Margin Tips

  • Invoices/Documents: 15-25mm for professional appearance
  • Labels: 2-5mm to maximize print area
  • Borderless: 0mm (printer may still add margins)
  • Headers/Footers: Ensure top/bottom margins accommodate header/footer height
If using headers or footers, the top/bottom margin must be at least as tall as the header/footer content. Fileloom adjusts this automatically, but very small margins may cause overlap.

Settings via API

Override template settings in your API request:
{
  "templateId": "tpl_abc123",
  "templateData": { ... },
  "options": {
    "format": "Letter",
    "orientation": "landscape",
    "margin": {
      "top": 20,
      "right": 15,
      "bottom": 20,
      "left": 15
    },
    "printBackground": true
  }
}
API options override template settings for that specific request.

Raw HTML Settings

When generating from raw HTML (no template), include settings in the options object:
{
  "htmlContent": "<h1>Hello World</h1>",
  "options": {
    "format": "A4",
    "orientation": "portrait",
    "margin": {
      "top": 10,
      "right": 10,
      "bottom": 10,
      "left": 10
    },
    "printBackground": true,
    "outputName": "hello-world"
  }
}
See API Reference for all available options.