Set document page setup
set_page_setupSet page margins, size, and orientation for a Google Doc or tab using presets or point values. Mirrors the File > Page setup dialog with direct changes.
Instructions
Set document-level page setup for a doc (or tab): page margins, page size, and orientation — the File > Page setup controls, which set_style can’t reach. Margins and explicit page sizes are in points (72 pt = 1 inch). pageSize is a preset (letter/legal/a4/tabloid) or an explicit {width,height} in points; orientation (portrait/landscape) swaps the page dimensions. A direct change, not a tracked suggestion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | Target a specific tab by tabId or title (from list_tabs). Defaults to the first tab. | |
| account | No | Google account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account. | |
| pageSize | No | a preset name, or {width,height} in points | |
| marginTop | No | top margin in points (72 = 1 inch) | |
| documentId | Yes | Google Doc id | |
| marginLeft | No | left margin in points | |
| marginRight | No | right margin in points | |
| orientation | No | portrait or landscape (orders the page width/height) | |
| marginBottom | No | bottom margin in points |