Javascript: TXTextControl.HeaderFooterType Enumeration
Description
Determines the type of a header or footer.
Members
| Member | Description |
|---|---|
| Header | The object is a header. When an even header exists, the object represents the odd header. Otherwise it represents the header of all pages. |
| FirstPageHeader | The object represents a special header of the document's or section's first page. |
| Footer | The object is a footer. When an even footer exists, this member represents the odd footer. Otherwise it represents the footer of all pages. |
| FirstPageFooter | The object represents a special footer of the document's or section's first page. |
| EvenHeader | The object represents an even header. |
| EvenFooter | The object represents an even footer. |
| All | The object represents an footer or header. |
Examples
The following example uses TXTextControl.HeaderFooterType.Header (the object is a header. When an even header exists, the object represents the odd header. Otherwise it represents the header of all pages.) in a document-editing workflow.
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
);