Merge pull request #60 from ShirshenduR/Fix#20
Fix#20 : fixed the tesseract issue
This commit is contained in:
@@ -144,7 +144,7 @@ async function runOCR() {
|
|||||||
binarizeCanvas(context);
|
binarizeCanvas(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await worker.recognize(canvas);
|
const result = await worker.recognize(canvas, {}, { text: true, hocr: true });
|
||||||
const data = result.data;
|
const data = result.data;
|
||||||
const newPage = newPdfDoc.addPage([viewport.width, viewport.height]);
|
const newPage = newPdfDoc.addPage([viewport.width, viewport.height]);
|
||||||
const pngImageBytes = await new Promise((resolve) =>
|
const pngImageBytes = await new Promise((resolve) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user