# @regulaforensics/document-reader-webclient

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

Latest version **9.8.1068** (published 2026-09-07) · MIT license · 7.8K weekly downloads

## Install

```sh
npm install @regulaforensics/document-reader-webclient
pnpm add @regulaforensics/document-reader-webclient
yarn add @regulaforensics/document-reader-webclient
bun add @regulaforensics/document-reader-webclient
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

## Facts

| | |
|---|---|
| Version | 9.8.1068 |
| Published | 2026-09-07 |
| First published | 2020-08-07 |
| Weekly downloads | 7.8K |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 942 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Regula Forensics, Inc. |
| Maintainers | regula, ikliashchou |
| Keywords | document-reader-webclient, document reader, document recognition, regulaforensics, regula |

## Links

- npm: https://www.npmjs.com/package/@regulaforensics/document-reader-webclient
- Repository: https://github.com/regulaforensics/DocumentReader-api-js-client
- Homepage: https://github.com/regulaforensics/DocumentReader-api-js-client#readme
- Issues: https://github.com/regulaforensics/DocumentReader-api-js-client/issues
- npm.io page: https://npm.io/package/@regulaforensics/document-reader-webclient

## Dependencies (3)

- [pako](https://npm.io/package/pako.md) ^2.1.0
- [axios](https://npm.io/package/axios.md) ^1.18.0
- [base64-arraybuffer](https://npm.io/package/base64-arraybuffer.md) ^1.0.2

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 9.8.1068 (latest) — 2026-09-07
- 9.9.1087-rc (rc) — 2026-09-19
- 9.9.1085-nightly (nightly) — 2026-09-17
- 7.2.2-beta.4 (next) — 2024-06-21
- 9.9.1086-rc — 2026-09-18
- 9.9.1084-rc — 2026-09-17
- 9.9.1083-nightly — 2026-09-16
- 9.9.1082-rc — 2026-09-16
- 9.9.1081-nightly — 2026-09-15
- 9.9.1080-rc — 2026-09-15
- 9.9.1079-nightly — 2026-09-14
- 9.9.1078-rc — 2026-09-12
- 9.9.1077-nightly — 2026-09-11
- 9.9.1076-nightly — 2026-09-11
- 9.9.1075-rc — 2026-09-11
- … 1106 more at https://npm.io/package/@regulaforensics/document-reader-webclient/versions

## README

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

[![npm version](https://img.shields.io/npm/v/@regulaforensics/document-reader-webclient?color=yellow&style=flat-square)](https://www.npmjs.org/package/@regulaforensics/document-reader-webclient)
![npm type definitions](https://img.shields.io/npm/types/typescript?style=flat-square&collor=858df6)
[![documentation](https://img.shields.io/badge/docs-en-f6858d?style=flat-square)](https://support.regulaforensics.com/hc/en-us/articles/115000916306-Documentation)
[![OpenAPI](https://img.shields.io/badge/OpenAPI-defs-8c0a56?style=flat-square)](https://github.com/regulaforensics/DocumentReader-web-openapi)
[![live](https://img.shields.io/badge/live-demo-0a8c42?style=flat-square)](https://api.regulaforensics.com/)

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](https://github.com/regulaforensics/DocumentReader-api-js-client/issues).
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](https://github.com/regulaforensics/DocumentReader-web-js-client/blob/master/dev.md)

## Install package

```
npm install @regulaforensics/document-reader-webclient
```
## Basic Example

Performing request:
```js
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:
```js
// 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](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package))

---
_Source: https://npm.io/package/@regulaforensics/document-reader-webclient · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
