Section

Overview

Section is a class in Aspose.Words FOSS for Java. Inherits from: CompositeNode<Node>, ISectionAttrSource.

Represents a single section in a document.

Edition status of its 23 listed members (a property and its accessor methods are listed separately, overloads once): 23 not yet exercised by a verified example.

This class declares 19 methods for Section objects in Java programs. Available methods include: Section, accept, acceptEnd, acceptStart, appendContent, clearContent, clearHeadersFooters, deepClone, deleteHeaderFooterShapes, ensureMinimum, getBody, getHeadersFooters, and 6 additional methods. Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package. Properties: body, headersFooters, nodeType, pageSetup, protectedForForms.

Properties

NameTypeAccessDescription
nodeTypeintReadReturns Section.
bodyBodyReadReturns the Body child node of the section.
headersFootersHeaderFooterCollectionReadProvides access to the headers and footers nodes of the section.
pageSetupPageSetupReadReturns an object that represents page setup and section properties.
protectedForFormsbooleanRead/WriteTrue if the section is protected for forms.

Methods

SignatureDescription
Section(doc: DocumentBase)Initializes a new instance of the Section class.
getNodeType() → intReturns Section.
getBody() → BodyReturns the Body child node of the section.
getHeadersFooters() → HeaderFooterCollectionProvides access to the headers and footers nodes of the section.
getPageSetup() → PageSetupReturns an object that represents page setup and section properties.
getProtectedForForms() → booleanTrue if the section is protected for forms.
setProtectedForForms(value: boolean)Sets the protected for forms value.
deepClone() → SectionCreates a duplicate of this section.
accept(visitor: DocumentVisitor) → booleanCalls accept(visitor) on this Section instance.
acceptStart(visitor: DocumentVisitor) → intCalls acceptStart(visitor) on this Section instance.
acceptEnd(visitor: DocumentVisitor) → intCalls acceptEnd(visitor) on this Section instance.
prependContent(sourceSection: Section)Inserts a copy of content of the source section at the beginning of this section.
appendContent(sourceSection: Section)Inserts a copy of content of the source section at the end of this section.
clearContent()Clears the section.
clearHeadersFooters()Clears the headers and footers of this section.
clearHeadersFooters(preserveWatermarks: boolean)Clears the headers and footers of this section.
deleteHeaderFooterShapes()Deletes all shapes (drawing objects) from the headers and footers of this section.
ensureMinimum()Ensures that the section has Body with one Paragraph.
toString() → StringCalls toString on this Section instance.

See Also