try to save edited pdf content to database

Product: apryse doc(@pdftron/webviewer)

Product Version: 11.1.1

i am using webviewer 11.1.1 at angular project i am editing the pdf after enable the toolbar
instance.UI.enableFeatures([instance.UI.Feature.ContentEdit]) here i am saving the annotation to db and merging the annotation to pdf with help of await annotationManager.exportAnnotations();

and merge the annotation
const promises = getdocumentAnnotationsList.map(async (anno: any) => {
** try {**
** if (anno.annotation) {**
** await annotationManager.importAnnotations(anno.annotation);**
** }**
** } catch (error) {**
** console.error(‘Error processing annotation:’, error);**
** }**
** });**
** await Promise.allSettled(promises);**

but here is problem edited text is not import and export at annotation. is there any solution for this

thanks
sonu kumar

1 Like

Hello Sonu Kumar,

Thank you for contacting WebViewer Forums.

The content editing inside PDFs are not annotations and will not show up when calling exportAnnotations() for example. If you would like to add annotations with text, I would consider using text annotations here: FreeText & Callout Annotations in WebViewer | Apryse documentation

Regards,
Luke

2 Likes

okay thanks you suggestion, content text is not got through the exportAnnotations. is there any option save the pdf to db through basestring6 or blob format after pdf text content is edited through edited content tool.

below screenshot i have added some text through edit content tool and added custom save pdf button for save pdf the changes to DB.

Thanks,
sonu kumar

1 Like

Hello Sonu Kumar,

We have our documentation here on saving the document as a blob using getFileData(): Saving a document with JavaScript | Apryse documentation