maket_canvas
Set or update a document's canvas including format, orientation, background, and margins. Call before adding content or when switching between formats.
Instructions
When to use: set or update the canvas (physical frame) of a document — format, orientation, background, margins. Call this before adding content to a fresh doc, or when switching a doc between formats.
Coordinates are in mm. Paper sizes — A2=420×594, A3=297×420, A4=210×297, A5=148×210, A6=105×148, A7=74×105, A8=52×74. Screen sizes — DESKTOP=288×205 (1440×1024), TABLET=167×239 (834×1194), MOBILE=79×170 (393×852). Unspecified fields keep their current value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | Document name. | |
| format | No | Paper (A2–A8, mm) or screen (DESKTOP/TABLET/MOBILE, mm-equivalent). Unspecified keeps the current value. | |
| margins | No | Per-side safe-zone insets in mm: {top, right, bottom, left}. The layout verdict reports `tight` when blocks cross into any band, and the client draws dashed guides at these insets. Unspecified keeps the current value. | |
| background | No | CSS background colour. Unspecified keeps the current value. Prefer var(--charte-color-bg) when a charte is loaded. | |
| orientation | No | Page orientation. Unspecified keeps the current value. |