Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

30 lines (26 sloc) 1.03 KB
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Basic Usage</title>
</head>
<body>
<script src="https://unpkg.com/tesseract.js@v2.0.0-alpha.13/dist/tesseract.min.js"></script>
<script>
const exampleImage = 'https://tesseract.projectnaptha.com/img/eng_bw.png';
const worker = new Tesseract.TesseractWorker();
worker.recognize(exampleImage)
.progress(progress => console.log('progress', progress))
.then(result => console.log('result', result))
.finally(() => worker.terminate());
const detectWorker = new Tesseract.TesseractWorker();
detectWorker.detect(exampleImage)
.progress(progress => console.log('progress', progress))
.then(result => console.log('result', result))
.finally(() => detectWorker.terminate());
</script>
</body>
</html>
You can’t perform that action at this time.