Need to delete specific list of annotation in pdfviewer

Hi Team,

i need to delete specific list of annotations, i have tried several methods its deleted partially not fully. 

example code: 

const annotationIds = ["313438", "313439", "313440", "313441", "313442", "313443", "313444", "313445"];

         annotationIds.forEach(annotationId => {

            try {

                let result = pdfViewer.annotationModule.deleteAnnotation(parseInt(annotationId));

            } catch (singleAnnotationError) {

                console.error(`Failed to delete annotation ${annotationId}:`, singleAnnotationError);

            }

        });


4 Replies

US Umamageshwari Shanmugam Syncfusion Team December 9, 2024 11:55 AM UTC

Hi Manimaran,


We have provided a sample for deleting specific annotations based on their type. Please test the sample, and if the issue persists, kindly share the code snippet, a video, or a screenshot of the error, including any console errors. Alternatively, you can modify the provided sample to reproduce the issue. This information will help us analyze the problem effectively and offer appropriate support.

Sample link - MVC Sample


Regards,

Umamageshwari Shanmugam



MA Manimaran replied to Umamageshwari Shanmugam December 11, 2024 06:20 AM UTC

Hi Team,


Thanks for the immediate response, I have checked your sample still i getting issue, i have created mixed with 10 annotation in circle and 5 annotation in rectangle and 5 annotation polygon all in different pages. when i click delete its partially deleted not all the circle removed.


Please do the needful.


Regards,

Manimaran



US Umamageshwari Shanmugam Syncfusion Team December 11, 2024 02:27 PM UTC

Hi Manimaran,


Thank you for the update. We were able to reproduce the reported scenario. We will analyze further on this and update you with more details in two business days on December 13, 2024.


Regards,

Umamageshwari Shanmugam



US Umamageshwari Shanmugam Syncfusion Team December 13, 2024 02:01 PM UTC

Hi Manimaran,


We have modified the sample. After deleting the annotations, need to decrement the index by 1 to resolve this issue. Please review the updated sample, and feel free to reach out if you need any further assistance or clarification.

Sample link - MVCSample


Regards,

Umamageshwari Shanmugam



Loader.
Up arrow icon