GroupDocs.Annotation for .NET 3.2.0 Release Notes

Major Features

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

  • Implement annotations import from Word documents
  • Implement  auto-import annotations when opening PDF documents
  • Add native Word annotations after export to Word documents different types of annotations
  • Fix users permission for Delete annotations

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
ANNOTATIONNET-249Import TextField annotation from Words DocumentsNew Feature
ANNOTATIONNET-236Implement TextRedaction annotation import from WordNew Feature
ANNOTATIONNET-244Implement Shape annotations import from WordNew Feature
ANNOTATIONNET-237Implement TextStrikeout annotation import from WordNew Feature
ANNOTATIONNET-238Implement Underline annotation import from WordNew Feature
ANNOTATIONNET-235Implement Area annotation import from WordNew Feature
ANNOTATIONNET-234Implement Text annotation import from WordNew Feature
ANNOTATIONNET-230Add native Word annotations after export Word documents to Text Replacement annotationNew Feature
ANNOTATIONNET-224Add native Word annotations after export Word documentsNew Feature
ANNOTATIONNET-228Add native Word annotations after export Word documents to Strikeout annotationNew Feature
ANNOTATIONNET-241Implement option for ability to auto-import annotations when opening PDF documentsImprovement
ANNOTATIONNET-250Fix users permission for Delete annotationsBug

Public API and Backward Incompatible Changes

Import and Export Annotations from Words document

            AnnotationConfig cfg = new AnnotationConfig();
            cfg.StoragePath = "TestData";

            AnnotationImageHandler annotator = new AnnotationImageHandler(cfg);
            if (!Directory.Exists(cfg.StoragePath))
            {
                Directory.CreateDirectory(cfg.StoragePath);
            }

            new License().SetLicense("path_to_proper_license");


            //importing annotations from Words document
            Stream stream = new FileStream("ImportAnnotationsWord.TestData.Annotated.docx", FileMode.Open, FileAccess.ReadWrite);

            AnnotationInfo[] annotations = annotator.ImportAnnotations(stream, DocumentType.Words);


            //export imported annotation to another document (just for check)
            Stream clearDocument = new FileStream("../../AddAnnotationsWords.TestData.Clear.docx", FileMode.Open, FileAccess.ReadWrite);
            Stream output = annotator.ExportAnnotationsToDocument(clearDocument, annotations.ToList(), DocumentType.Words);


            //save results after export
            using (FileStream fileStream = new FileStream("../../Annotated.docx", FileMode.Create))
            {
                byte[] buffer = new byte[output.Length];
                output.Seek(0L, SeekOrigin.Begin);
                output.Read(buffer, 0, buffer.Length);
                fileStream.Write(buffer, 0, buffer.Length);
                fileStream.Close();
            }