HeaderFooter

Overview

HeaderFooter is a class in Aspose.Words FOSS for Java. Inherits from: Story.

Represents a container for the header or footer text of a section.

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

This class declares 17 methods for HeaderFooter objects in Java programs. Available methods include: HeaderFooter, accept, acceptEnd, acceptStart, appendParagraph, deleteShapes, getFirstParagraph, getHeaderFooterType, getLastParagraph, getNodeType, getParagraphs, getParentSection, and 4 additional methods. Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package. Properties: firstParagraph, header, headerFooterType, lastParagraph, linkedToPrevious, nodeType, and 4 more.

Properties

NameTypeAccessDescription
nodeTypeintReadReturns HeaderFooter.
parentSectionSectionReadGets the parent section of this story.
headerFooterTypeintReadGets the type of this header/footer.
headerbooleanReadTrue if this HeaderFooter object is a header.
linkedToPreviousbooleanRead/WriteTrue if this header or footer is linked to the corresponding header or footer in the previous section.
storyTypeintReadGets the type of this story.
firstParagraphParagraphReadGets the first paragraph in the story.
lastParagraphParagraphReadGets the last paragraph in the story.
paragraphsParagraphCollectionReadGets a collection of paragraphs that are immediate children of the story.
tablesTableCollectionReadGets a collection of tables that are immediate children of the story.

Methods

SignatureDescription
HeaderFooter(doc: DocumentBase, headerFooterType: int)Creates a new header or footer of the specified type.
getNodeType() → intReturns HeaderFooter.
getParentSection() → SectionGets the parent section of this story.
getHeaderFooterType() → intGets the type of this header/footer.
isHeader() → booleanTrue if this HeaderFooter object is a header.
isLinkedToPrevious() → booleanTrue if this header or footer is linked to the corresponding header or footer in the previous section.
isLinkedToPrevious(value: boolean)Calls isLinkedToPrevious(value) on this HeaderFooter instance.
accept(visitor: DocumentVisitor) → booleanCalls accept(visitor) on this HeaderFooter instance.
acceptStart(visitor: DocumentVisitor) → intAccepts a visitor for visiting the start of the header.
acceptEnd(visitor: DocumentVisitor) → intAccepts a visitor for visiting the end of the header.
getStoryType() → intGets the type of this story.
getFirstParagraph() → ParagraphGets the first paragraph in the story.
getLastParagraph() → ParagraphGets the last paragraph in the story.
getParagraphs() → ParagraphCollectionGets a collection of paragraphs that are immediate children of the story.
getTables() → TableCollectionGets a collection of tables that are immediate children of the story.
deleteShapes()Deletes all shapes from the text of this story.
appendParagraph(text: String) → ParagraphA shortcut method that creates a Paragraph object with optional text and appends it to the end of this object.

See Also