Hi team,
During image extraction from docx, image format (tiff) is not getting extracted and is stopping the execution. Is there any possible method for extraction of all images from word document?
I have attached the sample word document with tiff image file format.
Regards
Priya dharshini J P
Hi Priya,
Thanks for your inquiry. Please refer to the following article:
We have tested the scenario using latest version of Aspose.Words for Java 17.4 with following code example. We have not found the shared issue. Please use
Aspose.Words for Java 17.4.
Document doc = new Document(MyDir + "sample.docx");
NodeCollection shapes = (NodeCollection) doc.getChildNodes(NodeType.SHAPE, true);
int imageIndex = 0;
for (Shape shape : shapes) {
if (shape.hasImage()) {
String imageFileName = String.format(
"Image.ExportImages.{0}_out.tiff", imageIndex);
shape.getImageData().save(MyDir + imageFileName);
imageIndex++;
}
}
Thanking You @tahir.manzoor for the help
Regards
Priya Dharshini J P