Hi
Sorry for the inconvenience. We are unable to reproduce the reported issue. For your reference, we have provided a sample and a video demonstrating the behavior.
In the sample, we downloaded the CRG with the latest version, exported and imported the annotations, and everything worked as expected. Kindly confirm whether you selected all the required modules and enabled the "minified" option while downloading the CRG.
To assist us further in our investigation, we request you to modify the shared sample to replicate the issue, provide a video recording demonstrating the problem, and share the exact version you are using. Additionally, describing the specific scenario in which the issue occurs will help us analyze the request flow more effectively and provide accurate support.
Sample: Export and Import Sample
Video: Export and Import
Regards,
Priyadharshini
Hi,
Thanks for the reply.
I think I wasn't clear in what my particular issues was.
I can indeed do, as you did in the video you attached, create annotations, export them using the menu and then import them using the menu.
However I am trying to do this using code only.
Even using the sample html you attached, after loading the page and open the DevTools inspector I find that the code
viewer.importAnnotations is undefined
Whereas:
viewer.importAnnotationsAsJson and
viewer.importAnnotation are defined. This appears to conflict with the documentation which suggest viewer.importAnnotations should exist and I wondered what is the correct code to execute.
Tks
Hi,
Thanks for the reply.
I think maybe I wasn't clear in what my particular issues was.
I can indeed do, as you did in the video you attached, create annotations, export them using the menu and then import them using the menu.
However I am trying to do this using code only.
Even using the sample html you attached, after loading the page and open the DevTools inspector I find that the code
viewer.importAnnotations
is undefined
Whereas:
viewer.importAnnotationsAsJson and viewer.importAnnotation are defined. This appears to conflict with the documentation which suggest viewer.importAnnotations should exist and I wondered what is the correct code to execute.
Hi Chris,
Thank you for your update. We were unable to reproduce the reported issue on our end and have shared a sample for both server-backed and standalone modes. Could you please confirm whether you are using server-backed mode or standalone mode for importing annotations? To assist us in further investigation, kindly provide a sample project where the issue can be reproduced, along with a video recording of the problem you're encountering. Additionally, please specify the version of the Syncfusion PDF Viewer you're using on both the client and server sides, if applicable. Please note that the importAnnotation method is used in the PDF Viewer control, not importAnnotations.
Sample:
Client: Client Sample
Service: Service Sample
Steps:
Standalone Mode:
Sample: Import Annotation Sample
Documentation: Import export annotation in EJ2 JavaScript Pdfviewer control | Syncfusion
Regards,
Venkada Subramanian D
Thanks.
The last line of your message gave me the answer to the question I have been asking from the start.
Please note that theimportAnnotationmethod is used in the PDF Viewer control, notimportAnnotations.
Hi Chris Gorske,
We're pleased to hear that your issue has been resolved. Don't hesitate to reach out if you need any further assistance.
Regards,
Priyadharshini