这是使用tess4j从图像/pdf到文本的OCR代码。我只想修改它,以便从命令行的输入中获取OCR_file.png/OCR_file.pdf,而不是按下面的方式指定路径-importImageIO.scanForPlugins(); // for server environment
File imageFile = new File("//home//deskto
我尝试编写一个简单的脚本,对给定的pdf文档执行OCR,并将其另存为pdf文档以使其可搜索。不幸的是,我是AppleScript的初学者,不能让它工作。Sandbox, the file will be saved to a temporary directory. [ocr→ file :tell application "FineReader OCR Pro"
export to pdf "<