💡 Before you start: if you just want to play with an online demo, visit our playground.
Requirements:
- installed java 11+
Java version verification:
java --version
> openjdk 14.0.1 2020-04-14Example of cloning:
git clone https://github.com/regulaforensics/DocumentReader-web-java-client.git
cd DocumentReader-web-java-clientgradlew.bat command should be used instead of ./gradlew.
Example of execution:
./gradlew :example:rungradlew.bat command should be used instead of ./gradlew.
Get your free trial here. When you receive the regula.license file,
copy it to the example resources folder. Now you are ready for start!
Follow the instructions to run Regula Document Reader web API. If the instance has been launched successfully, use the following line command to run the example:
API_BASE_PATH="http://127.0.0.1:8080" ./gradlew :example:runThis sample generates the following text output:
-----------------------------------------------------------------
Web API version: 7.5.308602.1848
-----------------------------------------------------------------
-----------------------------------------------------------------
Document Type: Germany - ePassport (2017) Service
Document Overall Status: not valid
Document Number Visual: C01YPTNHM
Document Number MRZ: C01YPTNHM
Validity Of Document Number Visual: 2
Validity Of Document Number MRZ: 1
MRZ-Visual values comparison: 1
-----------------------------------------------------------------
Field: Surname Value: MUSTERMANN Source: VISUAL
Field: Surname And Given Names Value: MUSTERMANN ERIKA Source: VISUAL
...
Also, it stores portrait and document image images in the current folder. You can modify this example and re-run it to get your own results.