Skip to main content

SetPictureSize

Sets the size for the picture in a content control.

Syntax​

expression.SetPictureSize(width, height);

expression - A variable that represents an ApiInlineLvlSdt class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
widthRequiredEMUThe desired image width .
heightRequiredEMUThe desired image height.

Returns​

boolean

Example​

Resize the image inside a picture content control in a document.

// How do I set the exact width and height of a picture content control in a document?

// Control the display dimensions of an embedded image to fit a fixed layout in a document.

let doc = Api.GetDocument();
let inlineControl = doc.AddPictureContentControl();
inlineControl.SetPictureSize(50 * 36000, 70 * 36000);