
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
react-native-tesseract-ocr
Advanced tools
react-native-tesseract-ocr is a react-native wrapper for Tesseract OCR using base on
$ npm install react-native-tesseract-ocr --save
$ react-native link react-native-tesseract-ocr
Don't forget to add trained data files to the appropriate folder
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-tesseract-ocr
and add RNTesseractOcr.xcodeproj
libRNTesseractOcr.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainActivity.java
import com.reactlibrary.RNTesseractOcrPackage;
to the imports at the top of the filenew RNTesseractOcrPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-tesseract-ocr'
project(':react-native-tesseract-ocr').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-tesseract-ocr/android')
android/app/build.gradle
:
compile project(':react-native-tesseract-ocr')
android/app/src/main/assets/tessdata
.import RNTesseractOcr from 'react-native-tesseract-ocr';
.
.
.
/**
* @param {string} imgPath - The path of the image.
* @param {string} lang - The language you want to process.
*/
RNTesseractOcr.startOcr(imgPath, lang)
.then((result) => {
this.setState({ ocrResult: result });
console.log("OCR Result: ", result);
})
.catch((err) => {
console.log("OCR Error: ", err);
})
.done();
Try the included TesseractOcrSample:
git clone git@github.com:jonathanpalma/react-native-tesseract-ocr.git
cd react-native-tesseract-ocr/tesseractOcrSample/
npm install
Contributions are welcome :raised_hands:
This repository is distributed under MIT license
FAQs
Tesseract OCR wrapper for React Native
The npm package react-native-tesseract-ocr receives a total of 152 weekly downloads. As such, react-native-tesseract-ocr popularity was classified as not popular.
We found that react-native-tesseract-ocr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.