headerFooters.pageNumbers.set
Atomically add a section's page numbers or change them: move them between header and footer, realign them, show or hide them on the first page, and set the number style and start.
mutates documentdry runconditional
doc.headerFooters.pageNumbers.set(…)Expected result
Returns the numbered header/footer parts and whether the section uses a distinct first page; PRECONDITION_FAILED with reason page-number-has-content when a moved or hidden number shares its paragraph with other text or fields.
Inputs
sectionSectionAddressrequiredFields
kind"section"requiredsectionIdstringrequiredkind"header" | "footer"required4 additional input fields
alignment"left" | "center" | "right"showOnFirstPagebooleanformat"decimal" | "lowerLetter" | "upperLetter" | "lowerRoman" | "upperRoman" | "numberInDash" | "hebrew1" | "hebrew2"startinteger | nullVariant 1
No fields.
Variant 2
No fields.
Result
Output fields
true
successtruerequiredsectionSectionAddressrequiredFields
kind"section"requiredsectionIdstringrequiredkind"header" | "footer"requiredpartsobject[]requiredtitlePagebooleanrequiredfalse
successfalserequiredfailureobjectrequiredFields
code"TARGET_NOT_FOUND" | "PRECONDITION_FAILED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR"requiredmessagestringrequireddetailsunknownFailures
Pre-apply throws
INVALID_INPUTINVALID_TARGETCAPABILITY_UNAVAILABLE
1 more codes
INTERNAL_ERROR
Non-applied receipt codes
TARGET_NOT_FOUNDPRECONDITION_FAILEDCAPABILITY_UNAVAILABLE
1 more codes
INTERNAL_ERROR
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