I am trying to load PDF file of my local storage then extract content in React.js without any backend.
I tried to find similar modules from google, but didn't find proper module yet. There are many node modules for parsing PDFs, and I can extract content of PDF in backend, but I am not sure we can use it in web browsers.
I tried this, and
pdfjs-distwas no longer functional. Instead, a better alternative to extract text from a PDF directly within React wasreact-pdftotext.1. Install the library:
2. Import the library:
3. Create an input field:
4. Prepare a function:
Finally, bringing it all together: