Javascript: PageBorder.setFirstPageOnly Method
Description
Sets whether the page border is drawn only on the first page of the section.
Syntax
<void> PageBorder.setFirstPageOnly(<boolean> firstPageOnly, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| firstPageOnly | Specifies whether the page border is drawn only on the first page of the section. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates PageBorder.setFirstPageOnly in a practical document-editing workflow. It sets whether the page border is drawn only on the first page of the section.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureFirstPageOnly(pageBorder) {
pageBorder.setFirstPageOnly(
true,
function() {
console.log("set first page only completed.");
},
onTxError
);
}