Socket
Socket
Sign inDemoInstall

tesseractocr

Package Overview
Dependencies
6
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tesseractocr

Node.js wrapper for Tesseract OCR CLI.


Version published
Maintainers
1
Created

Changelog

Source

1.2.0

  • Added API for cancelling ongoing recognition processes.

  • Introduced:

    • Method: tesseract.recognize.cancel(process)
    • Method: tesseract.recognize.cancelAll()
    • Event: started
    • Event: finished

Readme

Source

view on npm downloads per month node version build status test coverage license

Tesseract OCR for Node.js

Simple and modern Node.js wrapper implementation for Tesseract OCR CLI.

Features & Advantages

  • focus on high performance
  • both promise and callback APIs are supported
  • full test coverage
  • void of sync operations
  • no temp files are used

Usage

const recognize = require('tesseractocr')

recognize(`${__dirname}/image.png`, (err, text) => {
    if (err)
        throw err
    else
        console.log('Yay! Text recognized!', text)
})

Overall API docs

The overall API documentation can be found here

Installation

There is a hard dependency on the Tesseract project. You can find installation instructions for various platforms on the project site. For Homebrew users, the installation is quick and easy.

brew install tesseract --with-all-languages

The above will install all of the language packages available, if you don't need them all you can remove the --all-languages flag and install them manually, by downloading them to your local machine and then exposing the TESSDATA_PREFIX variable into your path:

export TESSDATA_PREFIX=~/Downloads/

You can then go about installing the Node.js package to expose the JavaScript API:

npm install tesseractocr

Tests and benchmarks

Clone the repo, npm install and then npm test or npm run benchmarks.

Changelog

The project's changelog is available here

License

MIT

Keywords

FAQs

Last updated on 27 Jan 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc