Automatically extract data from a wide variety of government issued documents to populate your adaptive forms.
There are a number of organizations providing this service and as long as they have well documented REST API’s you can easily integrate with AEM Forms using the data integration capability. For the purpose of this tutorial, I have used ID Analyzer to demonstrate the OCR data extraction of uploaded documents.
The following steps were followed to implement the OCR data extraction with AEM Forms using ID Analyzer service.
Create a developer account with ID Analyzer. Make a note of the API Key. This key will be needed to invoke REST API’s of the ID Analyzer’s service.
OpenAPI Specification (formerly Swagger Specification) is an API description format for REST APIs. An OpenAPI file allows you to describe your entire API, including:
To create your first swagger/OpenAPI file, please follow the OpenAPI documentation
AEM Forms supports OpenAPI Specification version 2.0 (fka Swagger).
Use the swagger editor to create your swagger file to describe the operations that send and verify OTP code sent using SMS. The swagger file can be created in JSON or YAML format. The completed swagger file can be downloaded from here
AEM Forms data integration provides an intuitive user interface to create and work with form data models. Base the form data model on the data source created in the earlier step.
We would need to get base64 encoded string of the uploaded document. This base64 encoded string is then passed as one of the parameters of our REST invocation.
The client library can be downloaded from here.
Integrate the POST invocations of the Form Data Model with your adaptive form to extract data from the uploaded document by the user in the form. You are free to create your own adaptive form and use the form data model’s POST invocation to send the base64 encoded string of the uploaded document.
If you want to use the sample assets with your API key please follow the following steps: