Choose an image with some text written to start detection.
Live demo no longer available. JavaScript HTMLconst $div = document.querySelector('div')
document.querySelector('input[type="file"]').onchange = function() {
const img = this.files[0]
Tesseract.recognize(img)
.progress(p => $div.textContent = p.progress)
.then(r => $div.textContent = r.text)
}
<input type="file">
<div></div>