I am developing a front-end application using JavaScript / HTML / CSS. This application allows the user to upload PDF files. I am looking for a way, using JavaScript, to discriminate whether a pdf file is native or scanned.
A native PDF is a PDF of a document that was “born digital” because the PDF was created from an electronic version of a document, rather than from print.
A scanned PDF, by contrast, is a PDF of a print document, such as when you scan in pages from a print journal and then save this file as a PDF. Please only submit native PDFs.
In the case of native pdf I don't want to allow the upload, while in the other case I want to allow the upload. I found this JavaScript library: https://pdfjs.express/ Maybe here's what I need but I don't know where to start. In stackoverflow I found something about it, but nothing about JavaScript code.