Comparing annotations using the equals method

You have the ability to compare annotations using the Equals method or the already implemented IEquatable interface.

Here is the example of the code:

using (Annotator annotator = new Annotator("annotated_file.pdf"))
	var annotations = annotator.Get();
	ImageAnnotation imageAnnotation = new ImageAnnotation
		Box = new Rectangle(100, 100, 100, 100),
		Opacity = 0.7,
		PageNumber = 0,
		ImagePath = "",
		Angle = 100
	foreach (var annotation in annotations)
		if (imageAnnotation.Equals(annotation))
			// Do some stuff here...

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full-featured .NET library we provide simple but powerful free Apps. You are welcome to annotate your PDF, DOC or DOCX, XLS or XLSX, PPT or PPTX, PNG and other documents with free to use online GroupDocs Annotation App.