Question
ReferenceError: runOCRIfNeeded is not defined
I want a js script that will first run Scan & OCR from Adobe Acrobat, and then run my custom script. Here is my script
function runOCRIfNeeded(doc) {
if (doc && !doc.isRecognized) {
app.execMenuItem("Scan:OCRRecognize");
app.alert("OCR completed");
}
}
function trustedRunOCR(oDoc) {
runOCRIfNeeded(oDoc);
}
that is in
Applications/Adobe\ Acrobat\ 2020/JavaScripts/testScript.js
,I have restarted the application many times but everything is fine and I get the error
Reference error
