Saving User Input in PDF Form Fields

Product: WebViewer

Product Version: 10.9.0

Please give a brief summary of your issue:
I am manually entering a value in a PDF form as an end-user. FieldManager getValue() is not returning the new value that I just entered (it’s returning the previous field’s value). It does get it when I do some UI action that seems to save the field value, for example, one zoom-out click. It looks like there’s some action that causes the user’s data entry in a form field to be saved.

How can I trigger this action programmatically?
Is there a method to fully save all the field values before pushing the PDF out to an external service?

I’m using getFileData() to convert the doc into b64 then pushing that out.

...
const { documentViewer, annotationManager } = window.globalInstance.Core;
const doc = documentViewer.getDocument();
window.globalInstance.UI.openElements(['loadingModal']);
const xfdfString = await annotationManager.exportAnnotations();
const data = await doc.getFileData({
                xfdfString
});
...
1 Like

Thank you for posting your question to our forum. We will provide you with an update as soon as possible.

1 Like

Hello,

We can listen to the fieldChanged() event which will trigger when a new value is entered. Documentation here: Fill-fields | Apryse Documentation

Regarding saving field values, exportAnnotations() does work. It will save the annotations along with its value property.

Hope this helps!

Regards,
Luke

1 Like