Document apiReferenceSections

sections.setLineNumbering

Enable, configure, or disable line numbering for a section. Enabling with no countBy stores 1. The start value is the stored Word offset. At a restart, start: 1 makes the first eligible line number 2. The distance is in inches. Omitting distance or setting it to zero uses automatic placement. Mounted SuperDoc v2 print layout shows multiples of countBy on eligible body lines and approximates automatic spacing from the physical columns. Section reads can report enabled for imported numbering markup that has no positive integer countBy. Those settings produce no labels.

mutates documenttracked modedry runconditional
doc.sections.setLineNumbering(…)

Expected result

Returns a SectionMutationResult receipt; reports NO_OP if line numbering settings already match.

Inputs

targetSectionAddressrequired
Fields
kind"section"required
sectionIdstringrequired
enabledbooleanrequired
4 additional input fields
countByinteger
startinteger
distancenumber
restart"continuous" | "newPage" | "newSection"

Result

Output fields
true
successtruerequired
dryRunboolean
sectionSectionAddressrequired
Fields
kind"section"required
sectionIdstringrequired
appliedChangeMode"direct" | "tracked"
false
successfalserequired
failureobjectrequired
Fields
code"NO_OP" | "INVALID_TARGET" | "CAPABILITY_UNAVAILABLE"required
messagestringrequired
detailsunknown

Failures

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • INVALID_INPUT
2 more codes
  • CAPABILITY_UNAVAILABLE
  • INTERNAL_ERROR

Non-applied receipt codes

  • NO_OP
  • INVALID_TARGET
  • 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