Document apiReferenceSections
sections.setPageMargins
Set page-edge margins in inches (1 inch = 1440 twips). Omitted margins keep their current values. In V2, usable page width and height must both stay positive after rounding to twips. Gutter counts toward the horizontal margins unless document settings place it at the top. To recover existing invalid margins, supply all needed corrections together.
mutates documenttracked modedry runconditional
doc.sections.setPageMargins(…)Expected result
Returns a SectionMutationResult receipt; reports NO_OP if margins already match the requested values.
Inputs
targetSectionAddressrequiredFields
kind"section"requiredsectionIdstringrequiredtopnumberconditionally requiredrightnumberconditionally requiredbottomnumberconditionally requiredleftnumberconditionally requiredgutternumberconditionally requiredResult
Output fields
true
successtruerequireddryRunbooleansectionSectionAddressrequiredFields
kind"section"requiredsectionIdstringrequiredappliedChangeMode"direct" | "tracked"false
successfalserequiredfailureobjectrequiredFields
code"NO_OP" | "INVALID_TARGET" | "INVALID_INPUT" | "CAPABILITY_UNAVAILABLE"requiredmessagestringrequireddetailsunknownFailures
Pre-apply throws
TARGET_NOT_FOUNDINVALID_TARGETINVALID_INPUT
2 more codes
CAPABILITY_UNAVAILABLEINTERNAL_ERROR
Non-applied receipt codes
NO_OPINVALID_TARGETINVALID_INPUT
1 more codes
CAPABILITY_UNAVAILABLE
Raw schemas
Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.
View raw JSON schemas