Update stamp image using APIs

Hello All, 

I'm adding a custom stamp annotation  : this.pdfviewerControl.customStampItems = [{ customStampName: "Image", customStampImageSource: 'data:image/png;base64,.....}].  I need to change the custom stamp image for a specfifc annotation , I tried the following but its not working.

var index = this.pdfviewerControl.annotationCollection.findIndex(x => x.annotationId === this.formData["annotation"].annotationId);
        this.pdfviewerControl.annotationModule.selectAnnotation(this.pdfviewerControl.annotationCollection[index].annotationId);
        this.pdfviewerControl.annotationCollection[index].stampAnnotationPath = 'data:image/png;base64,' + "newImageString";
        this.pdfviewerControl.annotationModule.editAnnotation(this.pdfviewerControl.annotationCollection[index]);



Thanks,
Mohamed

4 Replies 1 reply marked as answer

SM Selvakumar Murugan Syncfusion Team June 8, 2020 12:31 PM UTC

Hi Mohamed,

Currently we does not have a support to "edit the custom stamp annotation image" in edit Annotation methods, We will analyze the feasibility to provide the support  for the same and we will share more details on June 10th, 2020.

Regards,
Selvakumar
 



AA Akshaya Arivoli Syncfusion Team June 11, 2020 12:42 PM UTC

Hi Mohamed, 

Thank you for your patience. 

We have analyzed your requirement and we will provide “Support for editing custom stamp annotation in edit Annotation method” and the implementation will be included in our upcoming weekly NuGet release on June 24, 2020.  


Regards, 
Akshaya 



AA Akshaya Arivoli Syncfusion Team June 25, 2020 01:51 PM UTC

Hi Mohamed, 

Sorry for the inconvenience caused. 

The fix for the reported issue was not included in our latest weekly release. However the fix will be included in our 2020 Volume 2 release which is expected to rolled out in the end of June , 2020 

Regards, 
Akshaya  



AA Akshaya Arivoli Syncfusion Team July 8, 2020 04:11 AM UTC

Hi Mohamed,  
 
We have implemented the feature “Support for editing custom stamp annotation in edit Annotation method” and it was included in our Essential Studio Volume 2, 2020 release v18.2.0.44. So kindly upgrade the package and scripts to the latest version to get the implementation in your end.   
  
  
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.  
 
 
Code snippet: 
 
                 viewer.annotationModule.selectAnnotation(viewer.annotationCollection[i].id); 
            viewer.annotationCollection[i].stampAnnotationPath = “bas64string” 
            viewer.annotation.editAnnotation(viewer.annotationCollection[i]); 
 
 
 
Regards, 
Akshaya .

Marked as answer
Loader.
Up arrow icon