Extract Data from PDF Form Fields in React Native
PSPDFKit for React Native allows you to extract data from form fields programmatically. Each form field has a fully qualified name, which is used to identify and retrieve a specific form field object before extracting its data.
Getting the Fully Qualified Name of a Form Field
The example below shows how to obtain the fully qualified name of the first form field on the first page of a document:
let annotations = await this.refs.pdfView.getAnnotations(0, 'all'); let firstFormFieldName = annotations[0]['formFieldName'];
Getting the Data from a Form Field
The example below shows how to get the value of a form field:
let lastName = await Pspdfkit.getFormFieldValue('formFieldName');