The page element defines settings that apply to the entire template. It defines the page size and margins, header and footer behavior, and default HTML styles that apply to all elements in the template unless you otherwise define them for specific elements. Page does not contain content elements that appear on invoices.
Note: You can create more than one active version of an invoice template per locale, and use conditional expressions to determine which fields appear on a version of an invoice template. You can only use conditional expressions in templates that you create or that you copy from a marketplace-provided default template. You cannot add conditional expressions to marketplace default templates. For more information, see Build pages.
None.
In the Appdirect Template_EN_US default template, see lines 143-189.
To download the default template, go to .
Page exists at the same level as the three invoice sections, header, body, and footer.
{ "page": {}, "header": {}, "body": {}, "footer": {} }
{ "page": { "pageStyle": { "pageMargin": { "top": "45px", "right": "45px", "bottom": "45px", "left": "45px" } }, "properties": { "format": "A4", "height": "11in", "width": "8.5in", "displayHeaderOnFirstPage": false, "displayFooterOnFirstPage": true }, "elementStyles": [ { "name": "p", "style": { "font-size": "9px" } } ] }
Element | Type | Description | |||
---|---|---|---|---|---|
page |
object |
Required. Defines page properties. |
|||
pageStyle | object | Required. Defines page default styles. | |||
pageMargin | object |
Defines PDF page margin widths. |
|||
top | string |
Top margin width in pixels, ems, millimeters, points, or inches. Format: [0-9]+(px|em|mm|pt|in) Valid values: Dimension. Example: 45px |
|||
right | string |
Right margin width in pixels, ems, millimeters, points, or inches. Format: [0-9]+(px|em|mm|pt|in) Valid values: Dimension. Example: 45px |
|||
bottom | string |
Bottom margin width in pixels, ems, millimeters, points, or inches. Format: [0-9]+(px|em|mm|pt|in) Valid values: Dimension. Example: 45px |
|||
left | string |
Left margin width in pixels, ems, millimeters, points, or inches. Format: [0-9]+(px|em|mm|pt|in) Valid values: Dimension. Example: 45px |
|||
properties |
object | Required. Define page dimensions, and header and footer behaviour. Optionally, add properties that define visibility. | |||
format | string |
Required. Page dimensions defined by paper format name. When format is defined, it overrides height and width properties. When A4 | Letter | null A4 dimensions: 8.27 × 11.69 inches. Letter dimensions: 8.5 by 11 inches. |
|||
height | string |
Required. Page height dimension in pixels, ems, millimeters, points, or inches. When format property is defined, it overrides this property. To define custom dimensions, populate this and the width property, and set the format property to Format: [0-9]+(px|em|mm|pt|in) Valid values: Dimension or Example: 11in |
|||
width | string |
Required. Page width dimension in pixels, ems, millimeters, points, or inches. When format property is defined, it overrides this property. To define custom dimensions, populate this and the width property, and define the format property as Format: [0-9]+(px|em|mm|pt|in) Valid values: Dimension or Example: 11in |
|||
displayHeaderOnFirstPage | boolean |
Required. When a first or default header is defined in the header (see Build headers) and this property is set to Valid Values: true | false
|
|||
displayFooterOnFirstPage | boolean |
Required. When footer is defined in the footer component (see Build footers) and when this property is set to true | false |
|||
elementStyles | array | Style settings that apply to all elements in the template. Styles otherwise defined override these defaults. | |||
name | string |
HTML element name for which a style is defined. Valid values: All HTML element names. Examples: a p table th |
|||
style | object |
Defines CSS styles for the named HTML element. Only relevant styles that the Invoice Builder can render appear in the user interface preview and the PDF. Examples for "color": #474747" "text-decoration": "none"
Examples for "font-size": "9px" "font-family": "Arial"
Example for "font-family": "Arial" |