最新版本的ABB XY FineReader for OS X现在支持AppleScript。我尝试编写一个简单的脚本来执行给定pdf文档的OCR并将其保存为pdf文档以使其可搜索。不幸的是,我是AppleScript的初学者,无法让它发挥作用。我无法找到进一步的文档或样本来编写ABBYY FineReader脚本。
我设法打开了FineReader的字典,它有这个功能:
export to pdf v : Converts the current document to a PDF file. If FineReader is running in a Sandbox, the file will be saved to a temporary directory.
export to pdf file : NO_DESCRIPTION
[ocr languages enum language list type] : List of recognition languages that includes language identifiers and full language names.
[saving type save settings enum] : Specifies file creation settings for saving results.
[export mode pdf layout] : Specifies export mode.
[keep page numbers headers and footers boolean] : Keeps headers, footers and page numbers.
[page size page size enum] : Specifies paper size.
[keep pictures boolean] : Keeps pictures in recognized document.
[image quality image quality enum] : Specifies quality of pictures in output file.
[keep text and background colors boolean] : Keeps background and character colors.
[use mrc boolean] : Compresses the output file significantly while retaining high quality of text and images.
[make pdfa boolean] : Creates a searchable PDF document that is well suited for archiving.
[create outline boolean] : Creates a table of contents in a PDF file based on headings.
[enable pdf tagging boolean] : Enables PDF tags.
[embed fonts boolean] : Embeds fonts from the document in the e-book.
→ file :
我试过这个剧本:
tell application "FineReader OCR Pro"
export to pdf "<path to pdf>"
end tell
然而,我得到输出&#34;缺少值&#34;。有什么问题?
答案 0 :(得分:1)
看起来您可能需要提供将pdf保存到的路径。
试试这个:
tell application "FineReader OCR Pro"
export to pdf ((path to desktop) as string) & "test-export.pdf"
end tell
应将文件保存到桌面