Applescript или Automator: запустите Acrobat X Pro для пакетного распознавания нескольких файлов PDF, больше - PullRequest
1 голос
/ 18 августа 2011

Я использую ScanSnap S1500M для сканирования всех бумажных документов в папку / PDF-сканы / - Я хотел бы использовать Adobe Acrobat X Professional для распознавания текста.

Я бы хотелавтоматизировать этот процесс (ежедневно):

  • открыть Acrobat X Pro
  • пакетного распознавания документов PDF файлы в / PDF-сканы /, добавьте "-OCR" к имени файла
  • после OCR переместите файлы в / PDF-ocr /
  • удалите оригинальные файлы PDF в / PDF-сканы /

Должен ли я использовать Automator?Есть сценарий, который может сделать это?Обязательно ли его привязывать к повторяющимся событиям iCal?

Спасибо.

1 Ответ

1 голос
/ 18 августа 2011

Я бы скачал PDFPen , что позволяет легко просматривать документы. Как только вы это сделаете, вы можете использовать этот скрипт:

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
...