Please fill out the following template as best you can. .
→
Which product are you using?
PDF.js Express Plus
PDF.js Express Version
8.7.4
Detailed description of issue
How can I add the cloud annotations programmatically ?
Code snippet
I am adding simple polygon tool like below how to add cloud annotations ?
const createPolygonAnnotations = (annotationData: any, doc: any, Annotations: any, annotationsManger: any) => {
const polygonAnnotation = new Annotations.PolygonAnnotation();
polygonAnnotation.PageNumber = Number(annotationData.page);
const vertices = convertToCoordinateObjects(annotationData.coordinates)
polygonAnnotation.ga = vertices
polygonAnnotation.CustomData = {
addedType: 'programmatically',
};
return polygonAnnotation;
}