Compare annotations

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Annotation MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-annotation -- dnx GroupDocs.Annotation.Mcp --yes
Folders, licensing and more →

On this page

GroupDocs.Annotation allows you to compare annotations using the Equals method or the already implemented IEquatable interface.

The following code snippet shows how to compare annotations:

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 = "www.google.com.ua/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png",
		Angle = 100
	};
	foreach (var annotation in annotations)
	{
		if (imageAnnotation.Equals(annotation))
		{
			// Do some stuff here...
		}
	}
}

On this page