We try our best to provide minimal yet appropriate solutions to our customers. Hence, in this month’s release of GroupDocs.Annotation for .NET 19.3 you will observe some new “easy-to-implement” features. Lets start with ellipse annotation. You might be looking for it, we’ve now added its support for different document formats.

Ellipse Annotation

// For complete examples and data files, please go to https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-.NET
// Get input file stream
Stream inputFile = new FileStream(CommonUtilities.MapSourceFilePath(CommonUtilities.filePath), FileMode.Open, FileAccess.ReadWrite);
// Initialize list of AnnotationInfo
List<AnnotationInfo> annotations = new List<AnnotationInfo>();
// Initialize ellipse annotation.
AnnotationInfo ellipse = new AnnotationInfo
{
Box = new Rectangle(100, 100, 50, 50),
Type = AnnotationType.Ellipse;
};
// Add annotation to list
annotations.Add(ellipse);
// Export annotation and save output file
CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Pdf);

GroupDocs.Annotation for .NET 19.3 provides GetThumbnail method for PageImage class, that helps you in getting thumbnails of PDF document pages.

Get Thumbnails

// For complete examples and data files, please go to https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-.NET
// Create instance of annotator.
AnnotationConfig cfg = CommonUtilities.GetConfiguration();
AnnotationImageHandler annotator = new AnnotationImageHandler(cfg);
// Get input file stream
Stream inputFile = new FileStream(CommonUtilities.MapSourceFilePath(CommonUtilities.filePath), FileMode.Open, FileAccess.ReadWrite);
List<PageImage> images = annotator.GetPages(inputFile, new ImageOptions { WithoutAnnotations = true });
//Then if we want get thumbnail we call GetThumbnail() method of PageImage item:
foreach (PageImage pageImage in images)
{
Stream stream = pageImage.GetThumbnail(); // do something with stream
}
// Default image size was 300x180. If need specified image size, you can pass method parameters:
// image thumbnails 100x100
foreach (PageImage pageImage in images)
{
Stream stream = pageImage.GetThumbnail(100, 100);
// do something with stream
}

You’ll be glad to hear that multipage TIFF file can be processed by API. Have a glance at release notes.

Bug Fixes

Now coming to your issues, we’ll discuss some major fixes introduced in this release. There was issue in applying PenWidht and PenColor properties but now this is fixed.

AnnotationImageHandler.GetDocumentInfo exception while evaluating API in trial mode is now resolved. API now closes stream when you import annotations for Images. Lastly, issue in setting comments to shapes in Slides is fixed.

Learn more about API integration and usage check out the docs here.