Annotation Image to store in DB

I try to Export the Annotation Image to Store in DB or any storage device but using exportAnnotations() it always return with “Promise” Object.
Here xfdfString return as “Promise” Object.
Pls find the sample code as follows

const xfdfString = await instance.Core.annotationManager.exportAnnotations();
// Save to your database
await saveToDatabase(xfdfString)

Hi there,

Are there any console errors when doing this? Does this happen with any PDF? Normally this could happen if you didn’t use async and await, but I noticed you are using it in your sample code.

I wasn’t able to reproduce this issue. Can you reproduce this on our demo site? PDF.js Viewer Demo | PDF.js Express

You can run code in the console by changing the top context to webviewer-1

Best Regards,