GroupDocs.Annotation for Java 17.5.0 Release Notes

Major Features

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

  • Add Metered licensing support
  • Implemented DICOM documents annotating 
  • Implemented Otp documents annotating 
  • Implemented DjVu documents annotating
  • Adding annotations to EMF/WMF documents
  • Added Distance Annotations to image documents
  • Implemented CAD documents annotating 
  • Implemented Arrow annotation for images
  • Fixed replies to annotations for Word documents
  • Improving processing CAD files (user able to work with documents with several pages)
  • Improved import annotation for Words document
  • Processing tables, numebered lists and hyperlinks in Words documents
  • Fixed issue on mechanism of annotations detection on special cases for Words documents
  • Implemented ability to annotate Email documents (export only)
  • Added ability to annotate Html documents
  • Implemented import annotations from tables for Words documents

Full List of Issues Covering all Changes in this Release

KeySummaryIssue Type
ANNOTATIONNET-351Implement annotating for DICOM format imagesNew Feature
ANNOTATIONNET-348Add Metered licensing supportNew Feature
ANNOTATIONNET-344Implement adding annotations to Otp formatNew Feature
ANNOTATIONNET-340Implement annotating DjVu formatNew Feature
ANNOTATIONNET-368Implement distance annotation for imagesNew Feature
ANNOTATIONNET-367Implement annotating EMF/WMF documentNew Feature
ANNOTATIONNET-363Implement CAD documents annotatingNew Feature
ANNOTATIONNET-361Implement adding Arrow annotation to Image documentsNew Feature
ANNOTATIONNET-380Process hyperlinks in tables for Words documentsNew Feature
ANNOTATIONNET-379Processing numbered lists in tables for Words documentsNew Feature
ANNOTATIONNET-378Processing tables in Word documentsNew Feature
ANNOTATIONNET-393Implement GetDocumentInfo from a streamNew Feature
ANNOTATIONNET-392Implement Html documents annotatingNew Feature
ANNOTATIONNET-391Implement annotating Email formatNew Feature
ANNOTATIONNET-390Implement import annotations in tables for WordNew Feature
ANNOTATIONNET-381Improve import annotations from Word documentsImprovement
ANNOTATIONNET-376Improve Annotating CAD filesImprovement
ANNOTATIONNET-388Refactor annotations export logicImprovement
ANNOTATIONNET-365Export to MS-Word exporting the repeated reply commentsBug
ANNOTATIONNET-389Fix issues with annotations detection in some special cases in Words documentsBug

Public API and Backward Incompatible Changes

  1. Added new formats to annotating images article
  2. Adding annotations for EMF/WMF and CAD formats
  3. Adding Distance and Arrow annotations for image
  4. Added ability to get document information from stream
  5. Added annotating Email (export only) (Eml Emlx Msg) documents
  6. Added annotating (export only) Email (Html) documents

Metered licensing

String storagePath = Utilities.STORAGE_PATH;
        
// Setup Annotation configuration
AnnotationConfig annotationConfig = new AnnotationConfig();
annotationConfig.setStoragePath(storagePath);
 
InputStream cleanPdf = new FileInputStream(Utilities.STORAGE_PATH + File.separator + "SetLicense.TestData.Clear.pdf");
 
// Create new instance of GroupDocs.Annotation.Metered classs
Metered metered = new Metered();
 
// Set public and private key to metered instance
metered.setMeteredKey("**", "**");
 
// Get metered value before usage of the annotation
double amountBefore = Metered.getConsumptionQuantity();
System.out.println("Amount consumed  before: " + amountBefore);
 
//instantiating the annotation handler
AnnotationImageHandler annotator = new AnnotationImageHandler(annotationConfig);
AnnotationInfo pointAnnotation = new AnnotationInfo();
pointAnnotation.setAnnotationPosition(new Point(852.0, 81.0));
pointAnnotation.setBox(new Rectangle(212f, 81f, 142f, 0.0f));
pointAnnotation.setPageNumber(0);
pointAnnotation.setType(AnnotationType.Point);
pointAnnotation.setCreatorName("Anonym A.");
 
List<AnnotationInfo> annotations = new ArrayList<AnnotationInfo>();
annotations.add(pointAnnotation);
 
InputStream result = annotator.exportAnnotationsToDocument(cleanPdf, annotations, DocumentType.Pdf);
 
// Get metered value after usage of the annotation
double amountAfter = Metered.getConsumptionQuantity();
System.out.println("Amount consumed after: " + amountAfter);
System.out.println("Press any key...");