Javascript: SectionFormat.setColumnWidths Method
Description
Sets the widths, in twips, of the columns on a page.
Syntax
<void> SectionFormat.setColumnWidths(<number[]> columnWidths, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| columnWidths | The widths, in twips, of the columns on a page. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates SectionFormat.setColumnWidths in a practical document-editing workflow. It sets the widths, in twips, of the columns on a page.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureColumnWidths(sectionFormat) {
sectionFormat.setColumnWidths(
[],
function() {
console.log("set column widths completed.");
},
onTxError
);
}