SetNotEqualColumns

function SetNotEqualColumns(aWidths: twips[] = null, aSpaces: twips[] = null): void

Description

Specifies that all the columns in the current section have the different widths. Number of columns is equal to the length of the aWidth array. The length of the aSpaces array MUST BE equal to (aWidth.length - 1).

Parameters

aWidthstwips[]default: null

An array of column width values measured in twentieths of a point (1/1440 of an inch).

aSpacestwips[]default: null

An array of distance values between the columns measured in twentieths of a point (1/1440 of an inch).

Returns

void

Try It

var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
var oSection = oDocument.GetFinalSection();
oSection.SetNotEqualColumns([1440, 2880, 4320], [720, 480]);
oParagraph.AddText("This is a text split into 3 non-equal columns. ");
oParagraph.AddText("The first column is 1 inch wide (1440 twentieths of a point).");
oParagraph.AddColumnBreak();
oParagraph.AddText("This text starts from column #2. ");
oParagraph.AddText("This column is 2 inches wide (2880 twentieths of a point). ");
oParagraph.AddText("The distance between this column and column #1 is half an inch (720 twentieths of a point).");
oParagraph.AddColumnBreak();
oParagraph.AddText("This text starts from column #3. ");
oParagraph.AddText("This column is 3 inches wide (4320 twentieths of a point). ");
oParagraph.AddText("The distance between this column and column #2 is 1/3 of an inch (480 twentieths of a point).");

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).