# @pantrist/capacitor-plugin-ml-kit-text-recognition

> Capacitor Wrapper for TextRecognition of Gogoles ML-Kit

Latest version **8.1.1** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pantrist/capacitor-plugin-ml-kit-text-recognition
pnpm add @pantrist/capacitor-plugin-ml-kit-text-recognition
yarn add @pantrist/capacitor-plugin-ml-kit-text-recognition
bun add @pantrist/capacitor-plugin-ml-kit-text-recognition
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 8.1.1 |
| Published | 2026-09-24 |
| First published | 2022-05-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 32.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Nico Lueg |
| Maintainers | nico.lueg |
| Keywords | capacitor, plugin, native, ml-kit, text-recognition |

## Links

- npm: https://www.npmjs.com/package/@pantrist/capacitor-plugin-ml-kit-text-recognition
- Repository: https://github.com/Pantrist-dev/capacitor-plugin-ml-kit-text-recognition
- Homepage: https://github.com/Pantrist-dev/capacitor-plugin-ml-kit-text-recognition#readme
- Issues: https://github.com/Pantrist-dev/capacitor-plugin-ml-kit-text-recognition/issues
- npm.io page: https://npm.io/package/@pantrist/capacitor-plugin-ml-kit-text-recognition

## Recent versions

- 8.1.1 (latest) — 2026-09-24
- 8.0.0-beta.2 (beta) — 2026-02-05
- 8.1.0 — 2026-09-08
- 8.0.0 — 2026-02-05
- 8.0.0-beta.1 — 2026-02-05
- 8.0.0-beta.0 — 2026-02-05
- 7.0.0 — 2025-03-20
- 7.0.0-0 — 2025-03-07
- 6.2.1 — 2024-11-02
- 6.2.0 — 2024-09-06
- 6.1.0 — 2024-06-10
- 6.0.0 — 2024-04-29
- 5.1.1 — 2023-11-14
- 5.1.0 — 2023-11-13
- 5.0.1 — 2023-10-20
- … 7 more at https://npm.io/package/@pantrist/capacitor-plugin-ml-kit-text-recognition/versions

## README

# @pantrist/capacitor-plugin-ml-kit-text-recognition

[![npm version](https://badge.fury.io/js/@pantrist%2Fcapacitor-plugin-ml-kit-text-recognition.svg)](https://badge.fury.io/js/@pantrist%2Fcapacitor-plugin-ml-kit-text-recognition)
![npm downloads per month](https://img.shields.io/npm/dm/@pantrist/capacitor-plugin-ml-kit-text-recognition)

Capacitor Wrapper for TextRecognition of Googles ML-Kit

## Install

```bash
npm install @pantrist/capacitor-plugin-ml-kit-text-recognition
npx cap sync
```

## Configuration

### Android

**Optional** but recommended:
You can configure your app to automatically download the ML model to the device after your app is installed from the Play Store.
To do so, add the following declaration to your app's ``AndroidManifest.xml`` file:

```xml
<application ...>
  ...
  <meta-data
      android:name="com.google.mlkit.vision.DEPENDENCIES"
      android:value="ocr" />
  <!-- To use multiple models: android:value="ocr,model2,model3" -->
</application>
```

### iOS

Nothing to do for iOS


## Supported methods

| Name      | Android | iOS | Web |
| ----------- | ----------- |-----|-----|
| detectText   | ✅        | ✅    | ❌    |

## API

<docgen-index>

* [`detectText(...)`](#detecttext)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### detectText(...)

```typescript
detectText(options: DetectImageOptions) => Promise<TextDetectionResult>
```

Tries to detect text from the given image

| Param         | Type                                                              | Description                    |
| ------------- | ----------------------------------------------------------------- | ------------------------------ |
| **`options`** | <code><a href="#detectimageoptions">DetectImageOptions</a></code> | Options for the text detection |

**Returns:** <code>Promise&lt;<a href="#textdetectionresult">TextDetectionResult</a>&gt;</code>

--------------------


### Interfaces


#### TextDetectionResult

| Prop         | Type                 | Description          |
| ------------ | -------------------- | -------------------- |
| **`text`**   | <code>string</code>  | Found text           |
| **`blocks`** | <code>Block[]</code> | Parsed text by lines |


#### Block

| Prop        | Type                |
| ----------- | ------------------- |
| **`lines`** | <code>Line[]</code> |


#### Line

| Prop           | Type                   |
| -------------- | ---------------------- |
| **`elements`** | <code>Element[]</code> |


#### Element


#### DetectImageOptions

| Prop              | Type                | Description                                                                                      |
| ----------------- | ------------------- | ------------------------------------------------------------------------------------------------ |
| **`base64Image`** | <code>string</code> | The image to detect texts from                                                                   |
| **`rotation`**    | <code>number</code> | The image's counter-clockwise orientation degrees. Only 0, 90, 180, 270 are supported. Default 0 |

</docgen-api>

---
_Source: https://npm.io/package/@pantrist/capacitor-plugin-ml-kit-text-recognition · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
