TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

ScaleHeight

ScaleHeight(coefficient) → { boolean }

Scales the height of the figure using the specified coefficient.

Parameters:

Name Type Description
coefficient number

The coefficient by which the figure height will be scaled.

Returns:

Type
boolean

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
for (let i = 3; i > 0; i-- ){
    var oFill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61));
    var oStroke = Api.CreateStroke(0, Api.CreateNoFill());
    var oDrawing = Api.CreateShape("cube", 3212465, 963295, oFill, oStroke);
    oParagraph.AddDrawing(oDrawing);
    oDrawing.ScaleHeight( i );
}
builder.SaveFile("docx", "ScaleHeight.docx");
builder.CloseFile();

Resulting document