We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Image extraction issue 3

Dear team,

Im trying to extract images from docx using aspose java, but in this case we are notable to extract images i have shared my docx please do needful

input : Manuscript article clean.docx (8.8 MB)

while we are removing below given lines after that its getting extracted

Abbreviation: d_c – damage index under a compression condition; d_t – damage index under a tension condition; E_c – modulus of elasticity; f_c^’ – compressive strength of concrete; HS – high-strength concrete LVDT – linear variable differential transducer; M_p – plastic moment of the beam; M_u – ultimate moment of the connection; NS – normal-strength concrete; RC – reinforced concrete; SF – steel fibres; SESMA – superelastic shape memory alloy; ε ̅_c^in – cracking strain; ε_c – ultimate compressive strain; ε_c^cl – elastic strain corresponds to the undamaged interval; ε ̅_c^pl – plastic strain; σ_c – ultimate compressive stress; σ_t – ultimate tensile stress

@e503824 It is not quite clear what is the problem. I have used the following simple code to extract images from your document and all 97 images are extracted properly:

Document doc = new Document("C:\\Temp\\in.docx");
Iterable<Shape> shapes = doc.getChildNodes(NodeType.SHAPE, true);
int counter = 0;
for (Shape s : shapes)
{
    if (s.hasImage())
        s.getImageData().save("C:\\Temp\\img_" + (counter++) + FileFormatUtil.imageTypeToExtension(s.getImageData().getImageType()));
}