Ink Annotations

Dear,

How can I detect the ink annotations that are created on the document using the Ink annotation feature from MS Word. (See Draw and write with ink in Office - Microsoft Support).

We have a requirement that documents containing such ink annotations can not be accepted for processing.

Many thanks for your support

I’m using Words-Java 17.6.

Patrick

@PatrickVB

Thanks for your inquriy. Please note in MS Word Ink Annotation is a simple shape with a name “Ink + {ID}”. So you can find these shapes using the following simple code. Hopefully it will help you to accomplish the task.

// Get collection of shapes
 NodeCollection<Shape> shapes = doc.getChildNodes(NodeType.SHAPE, true);
 // Loop through all shapes
 for (Shape shape : shapes)
 {
	 if(shape.getName().contains("Ink"))
           // do something
 } 

Best Regards,

Many thanks for the explanation. It is the same approach as for watermarks,
Many thanks again.