GroupDocs.Annotation for .NET 17.2.0 Release Notes

Major Features

Below the list of improvements  and new features in this regular monthly release of GroupDocs.Annotation for .NET. The most notable are:

Implemented annotations annotating documents of following types:

  • Add Metered licensing support
  • Implemented DICOM documents annotating 
  • Implemented Otp documents annotating 
  • Implemented DjVu documents annotating 

Full List of Issues Covering all Changes in this Release

KeySummaryIssue Type
ANNOTATIONNET-351Implement annotating for DICOM format imagesNew Feature
ANNOTATIONNET-348Add Metered licensing supportNew Feature
ANNOTATIONNET-344Implement adding annotations to Otp formatNew Feature
ANNOTATIONNET-340Implement annotating DjVu formatNew Feature

Public API and Backward Incompatible Changes

Metered licensing

var storagePath = "StoragePath";
// Setup Annotation configuration
var annotationConfig = new AnnotationConfig { StoragePath = storagePath };
Stream cleanPdf = Assembly.GetExecutingAssembly().GetManifestResourceStream("SetLicense.TestData.Clear.pdf");
            
// Create new instance of GroupDocs.Annotation.Metered classs
GroupDocs.Annotation.Metered metered = new GroupDocs.Annotation.Metered();
            
// Set public and private key to metered instance
metered.SetMeteredKey("***", "***");
            
// Get metered value before usage of the annotation
decimal amountBefore = GroupDocs.Annotation.Metered.GetConsumptionQuantity();
Console.WriteLine("Amount consumed  before: " + amountBefore);
            
//instantiating the annotation handler
AnnotationImageHandler annotator = new AnnotationImageHandler(annotationConfig);
AnnotationInfo pointAnnotation = new AnnotationInfo
{
	AnnotationPosition = new Point(852.0, 81.0),
	Box = new Rectangle(212f, 81f, 142f, 0.0f),
	PageNumber = 0,
	Type = AnnotationType.Point,
	CreatorName = "Anonym A."
};
            
Stream result = annotator.ExportAnnotationsToDocument(cleanPdf, new List<AnnotationInfo>{ pointAnnotation}, DocumentType.Pdf);
// Get metered value after usage of the annotation
decimal amountAfter = GroupDocs.Annotation.Metered.GetConsumptionQuantity();
Console.WriteLine("Amount consumed  after: " + amountAfter);
Console.WriteLine("Press any key...");
Console.ReadKey();