Automatically detect pdf documents that needs OCR recognition in node
I have been using node pdfutils package to extract text from some pdf documents to a text file. Sometimes the output is a blank text file because the pdf document is scanned as a non editable one and in that case, I use node-tesseract to extract text. I'm switching manually between both strategies as needed. Does anyone know how to detect the automatically the difference?