WebViewer Version: 11.2.0
I’m facing an issue when trying to download an annotated image. Here’s the flow:
I share an image file.
The modal appears, and the image preview is displayed correctly.
I can annotate the image as expected.
However, I’m unable to download the image with the applied annotations.
I’m using WebViewer (with WebViewer server) in a ReactJS front-end. The problem seems to be related to handling the download functionality after annotation.
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It sounds like you’re having trouble saving an annotated image using WebViewer version 11.2.0 in a ReactJS environment. The main challenge is likely in exporting the image with its annotations so that it can be downloaded. This involves rendering the annotations on the image and then exporting the result.
Some things you can try:
Ensure that you have the correct setup for handling annotations in WebViewer. Use the annotManager.exportAnnotations() method to get the XFDF string of annotations.
Use instance.exportAnnotations() to get the XFDF data, and then apply it to the image using instance.loadDocument() with the appropriate options.
Convert the image and annotations into a canvas element, then use canvas.toDataURL() to get a downloadable image format.
Make sure to handle the promise returned by export methods to ensure that the data is fully prepared before the download starts.