I have a CSV with a list of URLs with PDFs:
- Some of these PDFs are searchable.
- Some of these PDFS aren't searchable.
I want to determine which PDFs are searchable from my list of PDFs. Is there an easy way to do this?
I have a CSV with a list of URLs with PDFs:
I want to determine which PDFs are searchable from my list of PDFs. Is there an easy way to do this?
On the commandline, I'd use pdffonts
to determine which fonts the file uses. This runs rather fast as well...
pdffonts bash-manpage.pdf name type encoding emb sub uni object ID ------------------------------- ------------- --------------- --- --- --- --------- Times-Roman Type 1 Custom no no no 8 0 Times-Bold Type 1 Standard no no no 9 0 Helvetica Type 1 Custom no no no 11 0 Helvetica-Bold Type 1 Standard no no no 30 0
pdffonts scanned-book.pdf pdffonts handmade.pdf name type encoding emb sub uni object ID ------------------------------- -------------- -------------- --- --- --- ---------
Example 1 shows a table with font names. This means there IS text to search.
Example 2 shows an empty table. No fonts, no text to be searched (unless you run OCR on the file to first embed any found text... but then you've created a different file!), don't look back at these...
Note: to be successful in actually extracting the embedded text and hence being able to search it is an entirely different problem. There are many cases where you'll find it to be extremely difficult -- especially if you see in the fonts' table font types like CID Type
with 'custom' encoding. You may first want to search stackoverflow for other questions that were asked about text extraction from PDF...
pdffonts
? Also is there any way in which I can check by writing a python script –
Ryannryazan © 2022 - 2024 — McMap. All rights reserved.