1

我正在使用 ScanSnap S1500M 将所有纸质文档扫描到文件夹 /PDF-scans/ - 我想使用 Adob​​e Acrobat X Professional 对文本进行 OCR。

我想自动化这个过程(每天):

  • 打开 Acrobat X Pro
  • 批量 OCR 处理 /PDF-scans/ 中的 PDF 文件,将“-OCR”附加到文件名
  • 在 OCR 之后,将文件移动到 /PDF-ocr/
  • 删除 /PDF-scans/ 中的原始 PDF 文件

我应该使用 Automator 吗?有没有可以做到这一点的脚本?它是否必须与 iCal 的重复事件相关联?

谢谢你。

4

1 回答 1

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
于 2011-08-18T12:04:50.860 回答