SOLVED - Automatic OCR with Acrobat XI

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

SOLVED - Automatic OCR with Acrobat XI Sat Apr 18, 2015 5:11 am • by kaiwei
Short of writing custom menu items using Javascript, you can use this script below if you don't mind Acrobat XI coming into focus on your desktop. Note that you need to run this as an external script.

Code: Select all
on hazelProcessFile(theFile)
   
   tell application "Adobe Acrobat Pro"
      activate
      open theFile
      delay 1
      tell application "System Events"
         tell application process "Acrobat"
            tell application "Adobe Acrobat Pro" to activate
            click the menu item "Text Recognition" of menu 1 of menu item "Tools" of the menu "View" of menu bar 1
            key code 97 -- "F6"
            key code 125
            key code 125
            key code 125
            key code 125
            key code 125
            key code 125
            delay 0.1
            keystroke return
            keystroke return
         end tell
      end tell
   end tell
   
   WaitWhileBusy(theFile)
   
   tell application "Adobe Acrobat Pro"
      activate
      tell application "System Events"
         tell application process "Acrobat"
            tell application "Adobe Acrobat Pro" to activate
            key code 1 using {command down}
            delay 3
            key code 12 using {command down}
         end tell
      end tell
   end tell
   
end hazelProcessFile

on WaitWhileBusy(theFile)
   -- initialize the loop
   set Size_1 to size of (info for theFile) -- get initial size
   delay 3 --wait 3 seconds, or whatever
   set Size_2 to size of (info for theFile) -- get a newer size, perhaps different
   -- repeat until sizes match
   repeat while Size_2 ≠ Size_1 --if they don't equal, loop until they do
      set Size_1 to Size_2 -- new base size
      delay 3 -- wait three seconds, or whatever
      set Size_2 to size of (info for myFolder) -- get a newer size
   end repeat --once the sizes match, the download is done
end WaitWhileBusy
kaiwei
 
Posts: 5
Joined: Wed Feb 11, 2015 6:45 am

Re: SOLVED - Automatic OCR with Acrobat XI Tue Jul 18, 2017 9:10 am • by aculee
This is great thanks!

We use Acrobat Pro, is there a way to embed a search index too into the pdf too?
aculee
 
Posts: 15
Joined: Wed Apr 05, 2017 9:08 am


Return to Support

cron