Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ocr-space-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ocr-space-api

Allow to access ocr.space API to send images and get the OCR Result (get the image text)

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ocr-space-api

Allow to access ORC.SPACE api to send images and get the result

More Details: https://ocr.space/ocrapi

IMPORTANT The OCR is provided by ocr space. I don't have anything with them, I just want to help sharing this library.

Instalation

First - Register and Get your API key

Get you API key at https://ocr.space/ocrapi ( Direct link : http://eepurl.com/bOLOcf ). Just, follow their steps.

Second - Install npm package

  npm install ocr-space-api --save

Usage example

You can see and example at the folder example

const ocrSpaceApi = require('ocr-space-api');

var options =  { 
    apikey: '<your_api_key_here>',
    language: 'por', // Português
    imageFormat: 'image/png', // Image Type (Only png ou gif is acceptable at the moment i wrote this)
    isOverlayRequired: true
  };

// Image file to upload
const imageFilePath = "imageFile.jpg";

// Run and wait the result
ocrSpaceApi.parseImageFromLocalFile(imageFilePath, options)
  .then(function (parsedResult) {
    console.log('parsedText: \n', parsedResult.parsedText);
    console.log('ocrParsedResult: \n', parsedResult.ocrParsedResult);
  }).catch(function (err) {
    console.log('ERROR:', err);
  });

Options

Language
isOverlayRequired

Default = False Allows you to specify if the image/pdf text overlay is required. Overlay could be used to show the text over the image

Keywords

FAQs

Package last updated on 10 Jul 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc