Javascript: Selection.isCommonPageSizeValueSelected Method
Description
Informs about whether an attribute from the PageSize.Attribute enumeration has the same value for the complete selection.
Syntax
<void> Selection.isCommonPageSizeValueSelected(<PageSize.Attribute> pageSizeAttribute, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| pageSizeAttribute | Specifies a possible value from the enumeration. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates Selection.isCommonPageSizeValueSelected in a practical document-editing workflow. Informs about whether an attribute from the PageSize.Attribute enumeration has the same value for the complete selection.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function isCommonPageSizeValueSelected(pageSizeAttribute) {
TXTextControl.selection.isCommonPageSizeValueSelected(
pageSizeAttribute,
function() {
console.log("is common page size value selected completed.");
},
onTxError
);
}