Looking for a OCR Library to integrate into a PHP/JS/HTML5 Web Application. PHP is preferred however any language can be made to work via exec so if a non-PHP option is faster or high quality I'd like to hear about it.


  • "fairly" good quality of OCR.
  • relatively fast conversion (and here's another requirement that is to say the least slightly subjective).
  • Open Source or a mature and well documented API.
  • Cross Platform.
  • Can't be a a web-service even if it has a great API (Due to use of the web application in confidential situations and on ether nets that are not guaranteed to have an active Internet connection.

2 Answers 2


There is a library for this: TesseractOCR for PHP


Using Tesseract under the hood, which is probably the best open source OCR library.

It is open source, and cross-platform.
No web service, everything is done on your server.


You may want to try this Open Source PHP OCR class that can recognize text in monochrome graphical images after a training phase.

It is written in pure PHP, so it is cross-platform, does not rely on external programs nor Web services.

It comes with examples scripts for either learning and recognizing text. The learning phase consists in passing it sample images with text with given text written it it, so later the class can recognize the text by itselt. A reasonable set of sample images is provided good initial training,


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.