2011-08-18 49 views
1

我使用ScanSnap S1500M將所有紙質文檔掃描到文件夾/ PDF掃描/ - 我想使用Adobe Acrobat X Professional以OCR文本。Applescript或Automator:運行Acrobat X Pro批量OCR多個PDF文件,更多

我想這個過程自動化(每天):

  • 開放的Acrobat X PRO
  • 批量OCR處理PDF文件/ PDF,掃描/,追加 「-OCR」 到文件名
  • OCR後,將文件移動到/ PDF-OCR/
  • 在/ PDF,掃描,刪除原始PDF文件/

我應該使用的Automator?有腳本可以做到這一點嗎?它是否必須與iCal的重複事件綁定?

謝謝。

+0

你能告訴Automator的打電話給你的AppleScript爲到達每一個新的文件......在你的AppleScript剛剛處理全部必要的行動...... Adob​​e應用程序有通過AppleScript甚至JavaScript腳本... – Yahia

+0

@Yahia:這不完全正確。 Acrobat只能使用Applescript編寫腳本,Adobe已將所有API開發推向Javascript。另外,Automator不是必需的; Applescript可以在應用程序中正確實施時巧妙地處理所有這些任務。我無法在這裏談到Javascript的功能。 –

回答

1

我會下載PDFPen它可以讓你很容易地ocr文件。一旦你做到了這一點,你可以使用這個腳本:

set the PDF_folder to "where:Ever:Your:PDF:folder:is:" as alias 
set the OCR_folder to "/where/ever/you/want/the/new/folder/to/be" as POSIX file 

tell application "Finder" 
    repeat with this_PDF in (every item of the PDF_folder) 
     my ocr(this_PDF) 
    end repeat 
end tell 

on ocr(this_PDF) 
    tell application "PDFpen" 
     open this_PDF as alias 
     tell document 1 
      ocr --simple 
      repeat while performing ocr 
       delay 1 
      end repeat 
      delay 1 
     end tell 
     set this_PDF to (save document 1 in this_PDF) 
     close document 1 
    end tell 
    tell application "Finder" 
     if not exists OCR_folder then set the OCR_folder to (make new folder at (the OCR_folder as alias with properties {name:"ocr"}) 
     move this_PDF to the OCR_folder with replacing 
    end tell 
end ocr 
相關問題