• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting Acrobat OCR
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Acrobat OCR


  • Subject: Re: Scripting Acrobat OCR
  • From: "Chris Johnson" <email@hidden>
  • Date: Thu, 22 Jun 2006 16:12:57 -0500

Here are my two scripts:

1.  Rule Action:

using terms from application "Mail"
      on perform mail action with messages The_Messages
              tell application "Mail" to repeat with this_message in
The_Messages
                      set attachement_file to first mail attachment
of this_message
                      set attachment_name to name of the first mail
attachment of this_message
                      save attachement_file in
"Users:cjohnson:Desktop:Scanned and
Recognized Documents:" & attachment_name
              end repeat
      end perform mail action with messages
end using terms from

2.  Folder Action:

on adding folder items to this_folder after receiving these_items
      repeat with i from 1 to number of items in these_items
              set this_item to item i of these_items
              set the item_info to info for this_item
              --OCR Commands
              activate application "Adobe Acrobat 7.0 Professional"
              tell application "Adobe Acrobat 7.0 Professional"
                      open this_item
              end tell
              tell application "System Events"
                      tell application process "Acrobat"
                              -- GUI Scripting statements:
                              --Statement 1
                              click the menu item "Start..." of menu
1 of menu item "Recognize
Text Using OCR" of the menu "Document" of menu bar 1
                              delay 4
                              --Statement 2
                              click radio button "All pages" of group
1 of group 2 of group 1 of
window "Recognize Text"
                              delay 4
                              --Statement 3
                              click button "OK" of group 1 of window
"Recognize Text"
                              --Save
                              tell application "Adobe Acrobat 7.0 Professional"
                                      save the front document
                                      close the front document
                              end tell
                      end tell
              end tell
      end repeat
end adding folder items to

Any suggestions on making more lean and mean are greatly appreciated.

On 6/15/06, Chris Johnson <email@hidden> wrote:
Hello:

I am new to this list and I'm looking for some help with applescript
and Acrobat.

My office has a copier that scans documents and then emails the
document as a pdf.  I would like to create an applescript which takes
the emailed pdf attachment (via an applescript/mail.app rule), opens
Acrobat, performs OCR, and then saves the pdf to a folder on my
desktop as a searchable image pdf.

I have run across two issues.

1. Finding a way to separate the pdf attachment via applescript and mail.app.

2. Accessing the OCR function in Acrobat via applescript.  I find no
reference to it anywhere.  Maybe there is no way to implement this?
Perhaps another avenue would be to look at engaging the batch function
in Acrobat.  I don't see any way to do this either.

Any help would be greatly appreciated.

Chris Johnson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Scripting Acrobat OCR (From: "Chris Johnson" <email@hidden>)

  • Prev by Date: Re: Currency Numbers
  • Next by Date: Strange error
  • Previous by thread: Scripting Acrobat OCR
  • Next by thread: Re: Script Debugger not scriptable (was Re: ANNOUNCE: Script
  • Index(es):
    • Date
    • Thread