Convert uploaded image and convert it into text using Tesseract.js.
git clone https://github.com/faizan-aion/nodejs-tesseract-ocr.git
cd nodejs-tesseract-ocr/
npm install
npm run start
git clone https://github.com/faizan-aion/nodejs-tesseract-ocr.git
cd nodejs-tesseract-ocr/
sudo docker build -t nodejs-tesseract-ocr:latest .
sudo docker run -d -p 8080:8080 nodejs-tesseract-ocrgit
Convert uploaded file into text.
POST: localhost:8080/api/tesseract
Params (Multipart/form-data):
+ name: "img", type: "File", required: "true"
Response:
{
"status": true,
"text": "It was the best of\ntimes, it was the worst\nof times, it was the age\nofwisdom, it was the\nage of foolishness“.\n\n",
"confidence": 89
}