I'm trying to extract the text out of pdfs, but I can't get pdf.js to work in gas.
I have been using advanced drive services and OCR to upload pdfs to google drive and convert via OCR, and up until now that's been giving acceptable results, but now I'm getting some pdfs that are not OCRing correctly (not even close). However, if I pull these pdfs up in Chrome and select all, copy, all the text is there to be had, if I could only use pdf.js within gas.
Has anyone found a way to make these two work together?
What I've tried
I tried pasting pdf.js into a gs file, and it's so big, it breaks all debugging. I can no longer use the gas debugger if that 42 thousand line js file is in my project.
I looked for a pdf library for gas that reads pdf text, but didn't find one. Maybe one is out there but there's no central library repo and googling was not successful.
I looked for a Google api to extract the text but didn't find one.
- Chrome has a built in add on to display pdf as html (an html pdf viewer), but I don't know how to tap into that.