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
Key | Summary | Issue Type |
---|---|---|
ANNOTATIONNET-351 | Implement annotating for DICOM format images | New Feature |
ANNOTATIONNET-348 | Add Metered licensing support | New Feature |
ANNOTATIONNET-344 | Implement adding annotations to Otp format | New Feature |
ANNOTATIONNET-340 | Implement annotating DjVu format | New 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();