HeaderFooterCollection Object
Description
Contains all headers and footers in a document or part of the document.
Syntax
HeaderFooterCollectionExamples
The following example demonstrates HeaderFooterCollection in a practical document-editing workflow. It contains all headers and footers in a document or part of the document.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.headersAndFooters.getItem(
TXTextControl.HeaderFooterType.Header,
function(headerFooter) {
if (!headerFooter) {
console.warn("No header footer was returned.");
return;
}
console.log("get item result:", headerFooter);
},
onTxError
);Members
Methods
| Method | Description |
|---|---|
| add | Adds a new header or footer to a document or to a certain section of the document. If a header or footer is added to the complete document the first section receives the header or footer and all other sections receive headers or footers which are connected to their previous section. To add more than one header or footer a combination of the HeaderFooterType enumeration values can be used. |
| elementAt | Returns the element at a specified index in the collection. (Inherited from Collection.) |
| forEach | Executes a callback function for each element. (Inherited from Collection.) |
| getCount | Gets the number of elements contained in the collection. (Inherited from Collection.) |
| getItem | Gets a particular header or footer from the collection. |
| remove | Removes a header or footer from the document or from a certain section. |