我會下載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
你能告訴Automator的打電話給你的AppleScript爲到達每一個新的文件......在你的AppleScript剛剛處理全部必要的行動...... Adobe應用程序有通過AppleScript甚至JavaScript腳本... – Yahia
@Yahia:這不完全正確。 Acrobat只能使用Applescript編寫腳本,Adobe已將所有API開發推向Javascript。另外,Automator不是必需的; Applescript可以在應用程序中正確實施時巧妙地處理所有這些任務。我無法在這裏談到Javascript的功能。 –