Page size, orientation, margins and direction

How the page model maps to the canvas and to the output. Canvas and workspace in the DocStudio designer interface.

The page settings are edited in the inspector when nothing is selected, in the Page group.

Settings

Setting Values Notes
size A3, A4, A5, A6, Letter, Legal The template schema also accepts a custom size { w, h } in millimetres, which you can set in the JSON tab
orientation portrait, landscape Swaps width and height
margins A number in millimetres One value applied to all four sides. The schema also accepts four values
direction ltr, rtl Text direction of the page
mode flow, fixed Recorded setting, see Fixed layout, flow layout and regions
background A color Page background
locale A language tag such as en or ar Used by formatters and as the document language
missingData blank, placeholder, warn, error What a missing value shows. See Missing data
theme A theme name Selects a theme from the configuration
name, description Text Labels for the template

Page sizes

A4 is 210 x 297 mm, A3 297 x 420, A5 148 x 210, A6 105 x 148, Letter 215.9 x 279.4 and Legal 215.9 x 355.6. The canvas page and the rulers use these exact sizes, so a page edge on the canvas is the true edge of the paper.

Margins

Margins reduce the area available to the body in flow layout. They apply to Print and PDF output as page margins, and to the Screen preview as sheet padding. A fixed region is positioned relative to the page content area.

Direction

With direction rtl the page flows right to left: text alignment, rows, tables and logical spacing mirror. Frames of elements in fixed regions are still measured from the physical left and top, so a position means the same thing in both directions. See Right-to-left documents.

Where the values come from

Page settings are part of the configuration cascade. The engine has defaults, an application can set its own values, the template overrides them and a section can override direction and tokens for its content. A host can lock settings, which are then shown read only with the reason "Locked by configuration". See Configuration.