GroupDocs.Annotation for .NET 19.1 Release Notes

This page contains release notes for GroupDocs.Annotation for .NET 19.1

Major Features

Below is the list of most notable changes in release of GroupDocs.Annotation for .NET 19.1:

  • Fixed bug of impossibility to set the line width on Slides documents
  • Fixed issue with opening protected with password Words and PDF documents
  • Improved performance issues when processing Slides documents
  • Add possibility to cache page previews
  • Added ability to annotate documents of older formats for Slides, Words, Cells (ppt, doc, xls)
  • Added ability to add text caption for distance annotation for Cells, Diagrams and Slides
  • Refactored logic for getting pages for Slides documents

Full List of Issues Covering all Changes in this Release

KeySummaryIssue Type
ANNOTATIONNET-823Add possibility to cache page previewsFeature
ANNOTATIONNET-830 Implement possibility to display distance annotation caption for Slides formatFeature
ANNOTATIONNET-831 Implement possibility to display distance annotation caption for Cells formatFeature
ANNOTATIONNET-832 Implement possibility to display distance annotation caption for Diagram formatFeature
ANNOTATIONNET-832 Add supporting processing older format for Slides (.ppt)Feature
ANNOTATIONNET-841 Add supporting processing older format for Cells (.xls)Feature
ANNOTATIONNET-842 Add supporting processing older format for Words (.doc)Feature
ANNOTATIONNET-835Refactor logic for getting pages for Slides documentsImprovement
ANNOTATIONNET-837Refactor PdfToPng saverImprovement
ANNOTATIONNET-844Line width not set in SlidesBug
ANNOTATIONNET-808Application is consuming 100% resources usage while loading documentBug
ANNOTATIONNET-849Issue when opening protected with password documentsBug
ANNOTATIONNET-866AnnotationImageHandler.GetPages exception in trial mode (for documents with more than 2 pages)Bug
ANNOTATIONNET-878Not closed stream when remove annotationsBug

Public API and Backward Incompatible Change

This section lists public API changes that were introduced in GroupDocs.Annotation for .NET 19.1. It includes not only new and obsoleted public methods, but also a description of any changes in the behavior behind the scenes in GroupDocs.Annotation which may affect existing code. Any behavior introduced that could be seen as a regression and modifies existing behavior is especially important and is documented here.
  1. ImageOptions for GetPages() method

    You can get image representation of pages of your PDF document by using GetPages method of AnnotationImageHandler class.

    List<PageImage> GetPages(Stream fileStream, ImageOptions options)
    List<PageImage> GetPages(string guid, ImageOptions options)
    List<PageImage> GetPages(string guid)
    CountPagesToConvertintDetermines count of pages to convert. PageNumber should be greater than 0.
    PageNumberintDetermines page number (index) to be converted. If PageNumber = 0 (by default) then all pages of document will be converted.
    PageNumbersToConvertListDetermines list of page numbers, that will be converted. For example, if need converted only 3, 5 and 7 pages.
    WithoutAnnotationsboolDetermines that image pages will be returned without annotations.

    Priority – it’s what will be happen if all parameters are sets:

    WithoutAnnotations1If this parameter is true, then document will be returned without annotations.
    PageNumbersToConvert2If this parameter not null and count of elements > 0, then only page numbers from PageNumbersToConvert parameter will be converted. PageNumber and CountPagesToConvert will be ignored.
    PageNumber3If this parameter = 0 (by default), then all pages of document will be converted. If parameter > 0, then will converted specified page.
    CountPagesToConvert4Working only if PageNumber > 0. If CountPagesToConvert = 1, then only one page will be converted (which is defined by PageNumber parameter). If CountPagesToConvert > 1, then will converted from Page number to PageNumber + CountPagesToConvert range.
    new ImageOptions()All pages of document will be converted.
    new ImageOptions() {WithoutAnnotations = true}All pages of document will converted, but without annotations.
    new ImageOptions() {PageNumber = 5}Only 5 page of document will be converted.
    List numberList = new List() { 2, 5, 7};new ImageOptions(){ PageNumbersToConvert = numberList }Only 2nd, 5th and 7th pages of document will be converted.
    new ImageOptions(){PageNumber = 5, CountPagesToConvert = 2}Pages 5,6,7 of document will be converted.
    In order to optimize GetPages performance method, we do not check if PageNumber or PageNumbersToConvert elements < number of document pages, because this is additional computing costs per every GetPages method call. So, if PageNumber or PageNumbersToConvert will be > number of document pages, then you will get ArgumentOutOfRange or IndexOutOfRange exception. So, you must control this outside GetPages call.

    Following example demonstrates how to use GetPages method:

    using System.Collections.Generic;
    using System.IO;
    using GroupDocs.Annotation.Config;
    using GroupDocs.Annotation.Domain.Image;
    using GroupDocs.Annotation.Domain.Options;
    using GroupDocs.Annotation.Handler;
    namespace GetPagesSample
        class Program
            static void Main(string[] args)
                Stream document = new FileStream("../../Clear.pdf", FileMode.Open);
                AnnotationConfig cfg = new AnnotationConfig();
                cfg.StoragePath = "StorageFolder";
                AnnotationImageHandler annotationHandler = new AnnotationImageHandler(cfg);
                List<PageImage> images = annotationHandler.GetPages(document, new ImageOptions());
                // Save result stream to file.
                using(FileStream fileStream = new FileStream("../../image.png", FileMode.Create))
                    byte[] buffer = new byte[images[0].Stream.Length];
                    images[0].Stream.Seek(0, SeekOrigin.Begin);
                    images[0].Stream.Read(buffer, 0, buffer.Length);
                    fileStream.Write(buffer, 0, buffer.Length);
  2. Enabling caching for opening same document pages

    ImageOptions imageOptions = new ImageOptions();
    imageOptions.CacheStoragePath = AnnotationImageHandler.GetFileDataStore().TempPath;
    imageOptions.EnableCaching = true;