How to extract text from scanned PDF files, which could work in both web workers and NodeJS too
I want to extract text from PDF files particularly only those that are made up of scanned images, I tried to use PDF.js methods with Tesseract.js OCR, but it won't work in web workers, although this is quite expected because document or any DOM elements are not available in web workers. The single most important reason I can't do this on the main thread or in the main script modules, is because of performance, as the browser can freeze or even crash while extracting large PDFs or containing many pages. This is the code I have currently: import * as pdfjsLib from 'pdfjs-dist'; import Tesseract
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.