# react-native-tesseract-ocr **Repository Path**: mirrors_jonathanpalma/react-native-tesseract-ocr ## Basic Information - **Project Name**: react-native-tesseract-ocr - **Description**: Tesseract OCR wrapper for React Native - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-07 - **Last Updated**: 2026-03-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

react-native-tesseract-ocr 👀

react-native-tesseract-ocr is a react-native wrapper for Tesseract OCR

[![Version][version-badge]][package] [![Install Size][size-badge]][package-size] [![Downloads][downloads-badge]][npmcharts] [![PRs Welcome][prs-badge]][prs] [![Commitizen friendly][cz-badge]][cz] [![MIT License][license-badge]][license] [![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-) [![Watch on GitHub][github-watch-badge]][github-watch] [![Star on GitHub][github-star-badge]][github-star] [![Tweet][twitter-badge]][twitter] This project uses: - [tess-two][url-tess-and] for Android - [Tesseract-OCR-iOS][url-tess-ios] for iOS ⚠️ (This has NOT been implemented yet) ⚠️ NOTE: It is recommended to use react-native >= 0.60.0 ## Getting started `$ npm i react-native-tesseract-ocr --save` ### Mostly automatic installation `$ react-native link react-native-tesseract-ocr` ## Example
Showcase Android using Picker Showcase Android using Camera
Check the example by yourself [here][url-example] ## Usage ### tessOptions | Property | Type | Description | | --------- | -------- | -------------------------------------------------------------------------- | | allowlist | `string` | List of characters you want to recognize | | denylist | `string` | List of characters you DON'T want to recognize | | level | `Level` | Level of the tokens of the page hierarchy (only used in `recognizeTokens`) | _`Level` can be one of the following values 'symbol' | 'block' | 'line' | 'paragraph' | 'word'_ ### recognize ```typescript import TesseractOcr, { LANG_ENGLISH } from 'react-native-tesseract-ocr'; const tessOptions = {}; TesseractOcr.recognize(imageSource, LANG_ENGLISH, tessOptions); ``` ### recognizeTokens ```typescript import TesseractOcr, { LANG_ENGLISH, LEVEL_WORD } from 'react-native-tesseract-ocr'; const tessOptions = { level: LEVEL_WORD }; TesseractOcr.recognizeTokens(imageSource, LANG_ENGLISH, tessOptions); ``` ### useEventListener ```typescript import React, { useState } from 'react'; import { useEventListener } from 'react-native-tesseract-ocr'; function App() { const [progress, setProgress] = useState(0); useEventListener('onProgressChange', (p) => { setProgress(p.percent / 100); }); // return ... } ``` ## Contributing ### How to contribute? This is a `commitizen friendly` repository, so instead of creating commits using `git commit`, please use our custom CLI by running: `$ npm run cz` ## Contributors ✨ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Jonathan Palma

💻 📖 💡

Johan Runsten

💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! ## License MIT © [jonathanpalma](https://github.com/jonathanpalma) This library wouldn't be possible without these amazing projects: - [Tesseract OCR][url-tesseract] - [Apache 2.0 license][url-tesseract-lsc] - [tess-two][url-tess-and] - [Apache 2.0 license][url-tess-and-lsc] [downloads-badge]: https://img.shields.io/npm/dm/react-native-tesseract-ocr.svg?style=flat-square [license-badge]: https://img.shields.io/npm/l/react-native-tesseract-ocr.svg?style=flat-square [license]: https://github.com/jonathanpalma/react-native-tesseract-ocr/blob/master/LICENSE [npmcharts]: http://npmcharts.com/compare/react-native-tesseract-ocr [package-size]: https://packagephobia.now.sh/result?p=react-native-tesseract-ocr [package]: https://www.npmjs.com/package/react-native-tesseract-ocr [prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square [prs]: http://makeapullrequest.com [cz-badge]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square [cz]: http://commitizen.github.io/cz-cli/ [size-badge]: https://flat.badgen.net/packagephobia/install/react-native-tesseract-ocr [version-badge]: https://img.shields.io/npm/v/react-native-tesseract-ocr.svg?style=flat-square [github-watch-badge]: https://img.shields.io/github/watchers/jonathanpalma/react-native-tesseract-ocr.svg?style=social [github-watch]: https://github.com/jonathanpalma/react-native-tesseract-ocr/watchers [github-star-badge]: https://img.shields.io/github/stars/jonathanpalma/react-native-tesseract-ocr.svg?style=social [github-star]: https://github.com/jonathanpalma/react-native-tesseract-ocr/stargazers [url-example]: https://github.com/jonathanpalma/react-native-tesseract-ocr/tree/master/example [url-eslint]: https://eslint.org/ [url-prettier]: https://prettier.io/ [url-tesseract]: https://github.com/tesseract-ocr/tesseract [url-tesseract-lsc]: https://github.com/tesseract-ocr/tesseract/blob/master/LICENSE [url-tess-and]: https://github.com/rmtheis/tess-two [url-tess-and-lsc]: https://github.com/rmtheis/tess-two/blob/master/COPYING [url-tess-ios]: https://github.com/gali8/Tesseract-OCR-iOS [url-tess-ios-lsc]: https://github.com/gali8/Tesseract-OCR-iOS/blob/master/LICENSE.md [twitter]: https://twitter.com/intent/tweet?text=Check%20out%20react-native-tesseract-ocr!%20https://github.com/jonathanpalma/react-native-tesseract-ocr [twitter-badge]: https://img.shields.io/twitter/url/https/github.com/jonathanpalma/react-native-tesseract-ocr.svg?style=social