Comments (4)
Please explain the problem, error you get, image or pdf you use, etc.
See the official docs for more info.
from ocr-space-api-wrapper.
const res1 = await ocrSpace(MY_IMAGE_URL, {language: 'tur'}).then(res => { console.log(res) })
this code succesfully works but when i use OCREngine 2
const res1 = await ocrSpace("MY_IMAGE_URL", {language: 'tur', OCREngine: 2}).then(res => { console.log(res) })
it prints: { OCRExitCode: 99, IsErroredOnProcessing: true, ErrorMessage: [ "Value for parameter 'language' is invalid" ], ProcessingTimeInMilliseconds: '31' }
from ocr-space-api-wrapper.
First of all you don't need to use .then if you are using await.
The correct code is:
async function main() {
const res = await ocrSpace(MY_IMAGE_URL, {language: 'tur'})
console.log(res)
}
Then the exit code is not dependant to this repository, but this is just a wrapper to the OCR Space service.
Maybe the tur language is not supported by OCREngine 2, try using Engine 1.
From the docs about Engine 2:
Engine2 has automatic Western language detection, so this value (language) will be ignored.
...
- Language auto-detect. It does not matter what OCR language you select, as long as it uses Latin characters
By the way I'm always using Engine 1 and is super efficient for me.
from ocr-space-api-wrapper.
Yeah, i removed language value and it worked, thanks sir.
from ocr-space-api-wrapper.
Related Issues (9)
- Uncaught Exception: TypeError: data should be a string, Buffer or Uint8Array HOT 3
- How did you overcome the error "Parameter name 'file' is invalid? HOT 2
- Couldn't get the TextOverlay HOT 4
- Add tests using the free api HOT 1
- Request timed out. HOT 8
- Error in axios, 403 forbidden HOT 9
- Better TypeScript support HOT 2
- Can this package work with a Blob as an input? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocr-space-api-wrapper.