首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用AppleScript编写脚本ABBYY

使用AppleScript编写脚本ABBYY
EN

Stack Overflow用户
提问于 2015-01-10 07:32:34
回答 1查看 1.6K关注 0票数 2

用于OS的最新版本的ABBYY FineReader现在支持AppleScript。我尝试编写一个简单的脚本,对给定的pdf文档执行OCR,并将其另存为pdf文档以使其可搜索。不幸的是,我是AppleScript的初学者,不能让它工作。我找不到更多用于编写ABBYY FineReader脚本的文档或示例。

我设法打开了FineReader的字典,它有这样的功能:

代码语言:javascript
复制
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 :

我尝试过这个脚本:

代码语言:javascript
复制
tell application "FineReader OCR Pro"
    export to pdf "<path to pdf>"
end tell

但是,我得到的输出是"missing value“。怎么啦?

EN

回答 1

Stack Overflow用户

发布于 2015-01-13 06:27:35

看起来你可能需要提供一个保存pdf的路径。

试试这个:

代码语言:javascript
复制
tell application "FineReader OCR Pro"
    export to pdf ((path to desktop) as string) & "test-export.pdf"
end tell

应将文件保存到桌面

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27870991

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档