User:Alexander Roidl/WebOCR
< User:Alexander Roidl
Revision as of 11:30, 29 January 2018 by Alexander Roidl (talk | contribs)
Web OCR
Libraries
I tried the OCRAD JS
http://antimatter15.com/ocrad.js/demo.html
and the tesseract JS
Tesseract JS
Insert the library
<script src="https://cdn.rawgit.com/naptha/tesseract.js/0.2.0/dist/tesseract.js"></script>
main function
<script> function runOCR(url) { Tesseract.recognize(url) .then(function(result) { document.getElementById("ocr_results") .innerText = result.text; }).progress(function(result) { document.getElementById("ocr_status") .innerText = result["status"] + " (" + (result["progress"] * 100) + "%)"; }); } document.getElementById("go_button") .addEventListener("click", function(e) { var url = document.getElementById("url").value; runOCR(url); }); </script>