GroupDocs.Annotation for Java 17.10 Release Notes

Major Features

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

  • Fixed SVG path parsing for specific cases
  • Implemented annotations import for Diagrams format (Area Redaction, Polyline, Text Field, Area Redaction)
  • Implemented setting opacity to annotations where it is possible
  • Exceptions handling improvements (added several more specific type of exceptions)
  • Implemented distance annotation adding for slides 
  • Implemented text annotations for Slides 
  • Added opacity for text annotations for Words 
  • Import text annotations for slides 
  • Fixed number of bugs from customers
  • Implemented export distance annotations for Words
  • Implemented adding comments for different types of Annotations for Diagrams format
  • Fixed wrong exporting comments for Words
  • Fixed issue with export large forn text for Wiords documents
  • Fixed comments exporting (in some cases old comments was exported)

Full List of Issues Covering all Changes in this Release

KeySummaryIssue Type
ANNOTATIONNET-448Set opacity for Diagrams annotationsNew Feature
ANNOTATIONNET-447Set opacity for Pdf annotationsNew Feature
ANNOTATIONNET-446Set opacity for Words annotationsNew Feature
ANNOTATIONNET-445Set opacity for Slides annotationsNew Feature
ANNOTATIONNET-490Implement clean of distance annotationNew Feature
ANNOTATIONNET-441Import text field annotation from DiagramNew Feature
ANNOTATIONNET-440Import polyline annotation from DiagramNew Feature
ANNOTATIONNET-439Import Area Redaction annotation from diagramNew Feature
ANNOTATIONNET-438Import area annotation from diagramNew Feature
ANNOTATIONNET-430Implement import annotations for DiagramNew Feature
ANNOTATIONNET-419Implement TextField annotation for DiagramsNew Feature
ANNOTATIONNET-489 Implement export of distance annotation New Feature
ANNOTATIONNET-488Implement import of distance annotationNew Feature
ANNOTATIONNET-487Implement distance annotation for slidesNew Feature
ANNOTATIONNET-482Import highlight annotation from slidesNew Feature
ANNOTATIONNET-481Import underline annotation from slidesNew Feature
ANNOTATIONNET-480Import strikeout annotation from slidesNew Feature
ANNOTATIONNET-479Import text annotations from slidesNew Feature
ANNOTATIONNET-477Implement opacity for text annotations in WordsNew Feature
ANNOTATIONNET-475Implement opacity for text annotations in slidesNew Feature
ANNOTATIONNET-468Implement underline annotation for slidesNew Feature
ANNOTATIONNET-467Implement strikeout annotation for slidesNew Feature
ANNOTATIONNET-466Implement text annotations for SlidesNew Feature
ANNOTATIONNET-508Implement export distance annotation for wordsNew Feature
ANNOTATIONNET-504Add comment for distance annotation in DiagramsNew Feature
ANNOTATIONNET-455Add comment for arrow annotation in DiagramsNew Feature
ANNOTATIONNET-454Add comment for resource redaction annotation in DiagramsNew Feature
ANNOTATIONNET-453Add comment for area annotation in DiagramsNew Feature
ANNOTATIONNET-452Add comment for polyline annotation in DiagramsNew Feature
ANNOTATIONNET-451Implement adding comments to annotations in diagramNew Feature
ANNOTATIONJAVA-1000Set annotations opacityNew Feature
ANNOTATIONNET-442Implement additional specific exceptionsImprovement
ANNOTATIONNET-485Simplify the cleaning of the document for the correct import of text annotationsImprovement
ANNOTATIONNET-471Change arrow shape for arrow annotationImprovement
ANNOTATIONNET-421Bug with parsing specific SVG pathBug
ANNOTATIONNET-483Exception thrown when deleting annotation with multiple repliesBug
ANNOTATIONNET-473Export document to word creates multiple commentsBug
ANNOTATIONNET-510Wrong comment exported to WordBug
ANNOTATIONNET-509Wrong Distance annotation exported to wordBug
ANNOTATIONNET-505Words: Fix export annotations for large fontsBug
ANNOTATIONNET-503Exporting a Word document adds old commentsBug
ANNOTATIONNET-497Comment is not exported in WordBug
ANNOTATIONJAVA-1027Exception is generated while annotating xlsx formatted documentBug
ANNOTATIONJAVA-1028Exception is generated while annotating pptx formatted documentBug
ANNOTATIONJAVA-1033Exception when get a document using file path as argumentBug
ANNOTATIONJAVA-1034Failed to get added annotationsBug
ANNOTATIONJAVA-1035Exception is thrown when certain method is called simultaneouslyBug
ANNOTATIONJAVA-1036Exception is thrown when retrieving area annotation from DOCX fileBug
ANNOTATIONJAVA-1037API fails to create Temp Directory in storage pathBug

Public API and Backward Incompatible Changes

To AnnotationInfo object added new Opacity field that sets opacity of annotation (can be null or float number between 0 and 1)

public void setOpacity(Double value);
public Double getOpacity();

Sample of usage

AnnotationInfo textAnnotation = new AnnotationInfo();
textAnnotation.setBox(new Rectangle(68, 154, 102, 9));
textAnnotation.setCreatorName("Anonym A.");

Import annotations from Diagram documents

AnnotationConfig cfg = new AnnotationConfig();
AnnotationImageHandler annotator = new AnnotationImageHandler(cfg);
if(!new File(cfg.getStoragePath()).exists() && !new File(cfg.getStoragePath()).mkdirs()) {
    System.out.println("Can't create directory!");
License license = new License();
InputStream input = new FileInputStream(Utilities.STORAGE_PATH + File.separator + "testImportArrow.vsdx");
AnnotationInfo[] annotations = annotator.importAnnotations(input, DocumentType.Diagram);
InputStream clearDocument = new FileInputStream(Utilities.STORAGE_PATH + File.separator + "testClear.vsd");
InputStream output = annotator.exportAnnotationsToDocument(clearDocument, Arrays.asList(annotations), DocumentType.Diagram);
try (OutputStream fileStream = new FileOutputStream(Utilities.STORAGE_PATH + File.separator + "testDiagramExported.vsdx")) {
    IOUtils.copy(output, fileStream);