GetAllImages
Gets the collection of image objects in the document.
Parameters:
This method doesn't have any parameters.
Returns:
- Type
-
Array.<ApiImage>
Example
Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
oImage1 = Api.CreateImage("https://api.onlyoffice.com/content/img/docbuilder/examples/coordinate_aspects.png", 60 * 36000, 35 * 36000);
oParagraph.AddDrawing(oImage1);
oImage2 = Api.CreateImage("http://api.teamlab.info/content/img/editor/sharing_settings.png", 60 * 36000, 35 * 36000);
oParagraph.AddDrawing(oImage2);
oImages = oDocument.GetAllImages();
oClassType = oImages[0].GetClassType();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("Class type: " + oClassType);
oDocument.Push(oParagraph);
builder.SaveFile("docx", "GetAllImages.docx");
builder.CloseFile();
Resulting document