Why image extraction from docx also saving an image with Aspose logo?

public void extractImagesFromDocx(byte[] docx) throws Exception {
    Document document = new Document(new ByteArrayInputStream(docx));
    NodeCollection<Shape> docShapes = (NodeCollection<Shape>) document.getChildNodes(NodeType.SHAPE, true);

    int idx = 0;
    for(Shape shape: docShapes) {
        if(shape.hasImage()) {
            String imageFileName = java.text.MessageFormat.format(
                    "Aspose.Images.{0}{1}", idx, FileFormatUtil
                            .imageTypeToExtension(shape.getImageData()
                                    .getImageType()));
            shape.getImageData().save(DIR+imageFileName);
            idx++;
        }
    }
}

Drawing.SaveAllImages.1.png (8.6 KB)

@gkumar16 to use Aspose products freely and without watermarks you need to have and set in your project a valid license. You can learn more about Aspose licensing following this link

Thanks @eduardo.canalf for the quick support. It was a license issue only.

1 Like