Skip to content
Start free

Page

page sets the paper and the defaults for everything on it. Every page of the PDF has the same size and margins.

PropertyRequiredDescription
sizeYesletter, legal, tabloid, a3, a4, a5 or custom
widthFor a custom size36 to 14,400. Only for a custom size
heightFor a custom size36 to 14,400. Only for a custom size
orientationYesportrait or landscape
marginsYes{ "top", "right", "bottom", "left" }. The header and footer go in the top and bottom margins
fontNoThe default text style (Fonts). Without one, text is 10 point Liberation Sans, black, with a line height of 1.2
backgroundNoThe page’s background color
backgroundImageNoAn uploaded image behind everything on every page (Background image)
watermarkNoText across the middle of every page, over the content (Watermark)
SizeWidth × height in points (portrait)
letter612 × 792
legal612 × 1008
tabloid792 × 1224
a3841.89 × 1190.55
a4595.28 × 841.89
a5419.53 × 595.28

landscape swaps the width and height, a custom size’s too. The sections are as wide as the page less its left and right margins: 540 points on a portrait Letter page with half-inch margins.

backgroundImage puts an image uploaded to the template behind everything on every page, including the header and footer: a letterhead, or a certificate’s border.

PropertyRequiredDescription
slugYesThe uploaded image’s name, as an image element’s source has it
scaleTypeNostretch (the default) fills the page exactly; fill covers it, cropping the image; fit shows all of it, centered

Make the image the page’s shape and use stretch, so it lines up with the page’s edges.

watermark prints text across the middle of every page, over the content, such as “DRAFT” or “COPY”.

PropertyRequiredDescription
textYesText and field nodes, as a QR code’s value
fontNoA font. Bold, in the page’s family; 72 points and black when it doesn’t say
opacityNo0 (invisible) to 1. 0.15 when left out
rotationNoDegrees clockwise, -360 to 360. -45 when left out, rising from left to right
layerNoabove the content (the default) or below it, where boxes with a background cover it
conditionNoOnly print it when this is true (Conditions)

The text is centered in the area inside the margins, on one line: choose a size that fits.

An A4 page in landscape, with wider margins, a default font and an off-white background:

{
"version": 1,
"page": {
"size": "a4",
"orientation": "landscape",
"margins": { "top": 72, "right": 54, "bottom": 54, "left": 54 },
"font": {
"family": "Lato",
"size": 11,
"color": "#222222",
"lineHeight": 1.4
},
"background": "#fffdf7"
},
"sections": []
}

A letterhead image behind every page, and “DRAFT” in red until the document is final:

{
"version": 1,
"page": {
"size": "letter",
"orientation": "portrait",
"margins": { "top": 108, "right": 54, "bottom": 72, "left": 54 },
"backgroundImage": { "slug": "letterhead" },
"watermark": {
"text": [{ "type": "text", "text": "DRAFT" }],
"font": { "size": 120, "color": "#c00000" },
"opacity": 0.12,
"condition": "status != \"final\""
}
},
"sections": []
}

A 4 × 6 inch shipping label:

{
"version": 1,
"page": {
"size": "custom",
"width": 288,
"height": 432,
"orientation": "portrait",
"margins": { "top": 18, "right": 18, "bottom": 18, "left": 18 }
},
"sections": []
}