Check whether a document is searchable
Hello, I've been trying to check whether a pdf is searchable, and if it's not, automatically do OCR Action to the document. Until now, I've found two ways of doing it (not efficiently). My question is about the function search.available. I read in the Acrobat JavaScript Scripting Guide that the function can determine if searching is possible. But when I used that to a pdf that is unsearchable, its result was confusing. It said "true" even though it was clearly false. I'm very new to JavaScript, can you guys show me how to use the function in a correct way? Or do you have any idea on how to check whether a document is searchable other than the activation of Read Out Loud function and search for specific word(s)?
Thankyou very much! 🙂
