CreateImage
function CreateImage(sImageSrc: string = null, nWidth: EMU = null, nHeight: EMU = null): ApiImage
Description
Creates an image with the parameters specified.
Parameters
- sImageSrc
string
null The image source where the image to be inserted should be taken from (currently only internet URL or Base64 encoded images are supported).
The image width in English measure units.
The image height in English measure units.
Returns
ApiImage
Try It
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
var oDrawing = Api.CreateImage("https://api.onlyoffice.com/content/img/docbuilder/examples/coordinate_aspects.png", 60 * 36000, 35 * 36000);
oParagraph.AddDrawing(oDrawing);