Hi,
We are using the aspose for adding the water mark in Word document. In our business process, at one state adding the water mark(backgroud image) and another state removing the water mark. Here issue is, if any Document contains the screen shot( Picture image), it is also removing. How can we remove only attached image , not other images(screen shot) .
Code using for the attaching the watermark(Image):
Shape shape = builder.insertImage("d:\\image.jpg");
shape.setWrapType(WrapType.NONE);
shape.setBehindText(true);
shape.setRelativeHorizontalPosition(RelativeHorizontalPosition.PAGE);
shape.setHorizontalAlignment(HorizontalAlignment.CENTER);
shape.setRelativeVerticalPosition(RelativeVerticalPosition.PAGE);
shape.setVerticalAlignment(VerticalAlignment.CENTER);
Code using for the removing the image:
NodeCollection shapes = doc.getChildNodes(NodeType.SHAPE, true, false);
shapes.clear();
Please let me know, how to romove only attached image not other images in the word document.
Regards,
Dheeraj