7.2.2 • Published 15 days ago

@regulaforensics/document-reader-webclient v7.2.2

Weekly downloads
38
License
MIT
Repository
github
Last release
15 days ago

Regula Document Reader js client for the browser and node.js based on axios

npm version npm type definitions documentation OpenAPI live

Documents recognition as easy as reading two bytes.

If you have any problems with or questions about this client, please contact us through a GitHub issue. You are invited to contribute new features, fixes, or updates, large or small. We are always thrilled to receive pull requests, and do our best to process them as fast as we can. See dev guide

Install package

npm install @regulaforensics/document-reader-webclient

Basic Example

Performing request:

import { DocumentReaderApi, Scenario, TextFieldType, GraphicFieldType } from '@regulaforensics/document-reader-webclient';
const { DOCUMENT_NUMBER, SURNAME_AND_GIVEN_NAMES, DATE_OF_BIRTH } = TextFieldType;
const { PORTRAIT, SIGNATURE } = GraphicFieldType;

const imageAsBase64String = getDocImageAsBase64String();
const api = new DocumentReaderApi({ basePath: 'http://localhost:8080' });
const result = await api.process({ images: [documentImage], processParam: { scenario: Scenario.FULL_PROCESS} });

Parsing results:

// text fields
const docNumber = result.text?.getField(DOCUMENT_NUMBER);
const fullName = result.text?.getField(SURNAME_AND_GIVEN_NAMES);
const dateOfBirth = result.text?.getField(DATE_OF_BIRTH);

// graphics fields
const portraitAsBase64 = result.images?.getField(PORTRAIT);
const signatureAsBase64 = result.images?.getField(SIGNATURE);

Compatibility

Language level

  • ES5 with some ES6 features Promise and whatwg URL. If your environment doesn't support ES6 required features, you can polyfill.
  • nodejs 18+

Module system

  • CommonJS
  • ES6 module system

Definitions

  • TypeScript's definitions should be automatically resolved via package.json. (Reference)
7.2.2-beta.1

15 days ago

7.2.2-beta.0

19 days ago

7.2.1-beta.0

19 days ago

7.2.2

19 days ago

7.2.1

19 days ago

7.1.4-beta.1

21 days ago

7.1.4-beta.0

1 month ago

7.1.3-beta.2

1 month ago

7.1.4

1 month ago

7.1.3

2 months ago

7.1.3-beta.0

2 months ago

7.1.3-beta.1

2 months ago

6.6.1-beta.0

2 months ago

7.1.2

2 months ago

7.1.1

3 months ago

7.1.0

3 months ago

6.9.6

4 months ago

11.4.17

8 months ago

6.9.0

8 months ago

6.9.2

7 months ago

6.9.1

7 months ago

6.9.4

6 months ago

6.9.3

7 months ago

6.9.5

5 months ago

5.5.5

8 months ago

6.8.1

12 months ago

6.8.0

12 months ago

6.8.3

11 months ago

6.8.2

11 months ago

6.7.2

1 year ago

6.7.1

1 year ago

6.7.0

1 year ago

6.6.1

1 year ago

6.5.0

2 years ago

6.5.2

2 years ago

6.6.0

1 year ago

6.5.1

2 years ago

6.3.2

2 years ago

6.3.0

2 years ago

6.1.2

2 years ago

6.1.4

2 years ago

6.3.1

2 years ago

6.1.3

2 years ago

6.1.5

2 years ago

6.1.0

2 years ago

6.1.1

2 years ago

5.8.4

2 years ago

5.8.3

3 years ago

5.8.2

3 years ago

5.8.1

3 years ago

5.8.0

3 years ago

5.7.2

3 years ago

5.7.1

3 years ago

5.7.0

3 years ago

5.6.6

3 years ago

5.6.5

3 years ago

5.6.4

3 years ago

5.6.3

3 years ago

5.6.0

3 years ago

5.6.2

3 years ago

5.6.1

3 years ago

5.5.3

3 years ago

5.5.1

3 years ago

5.5.0

3 years ago

5.5.0-beta.6

3 years ago

5.5.0-beta.5

3 years ago

5.5.0-beta.4

3 years ago

5.5.0-beta.3

3 years ago

5.5.0-beta.2

3 years ago

5.5.0-beta.1

3 years ago

5.5.0-beta.0

3 years ago

5.4.0

3 years ago

5.4.0-beta.0

3 years ago

5.3.0-beta.1

3 years ago

5.3.0-beta.0

3 years ago

5.2.0

4 years ago