【发布时间】:2015-12-02 08:58:35
【问题描述】:
我想用pdftooppm 从xpdfbin-win-3.04 package 转换以下pdf。
我试着把windows shell放进去:
C:\Users\TestUser> C:/LocalData/TestUser/OCR/xpdfbin-win-3.04/xpdfbin-win-3.04/bin64/
pdftoppm -f 1 -l 10 -r 600 ocrbook Q:/Desktop/PDFs/Folder/Other Docus/convertThisPDF.pdf
但是,我只得到以下结果:
pdftoppm version 3.04
Copyright 1996-2014 Glyph & Cog, LLC
Usage: pdftoppm [options] <PDF-file> <PPM-root>
-f <int> : first page to print
-l <int> : last page to print
-r <int> : resolution, in DPI (default is 150)
-mono : generate a monochrome PBM file
-gray : generate a grayscale PGM file
-freetype <string>: enable FreeType font rasterizer: yes, no
-aa <string> : enable font anti-aliasing: yes, no
-aaVector <string>: enable vector anti-aliasing: yes, no
-opw <string> : owner password (for encrypted files)
-upw <string> : user password (for encrypted files)
-q : don't print any messages or errors
-cfg <string> : configuration file to use in place of .xpdfrc
-v : print copyright and version info
-h : print usage information
-help : print usage information
--help : print usage information
-? : print usage information
任何建议我做错了什么?
感谢您的回复!
PS.:我反转了\,因为这个代码部分是在 R 中运行的。
【问题讨论】:
-
使用双引号
pdftoppm [options] "<PDF-file>" "<PPM-root>"。ocrbook参数代表什么? -
帮助页面说最后一个参数应该是
<PPM-root>,在你的情况下最后一个参数是PDF文件的名称。看起来您只是错误地使用/调用了该工具。会不会是你把最后两个参数弄歪了(即“ocrbook”实际上应该是最后一个参数)? -
@Christian.K 感谢您的回复!基本上我正在尝试在 R 中实现以下脚本:github script。老实说,我仍然不清楚
ocrbook可能是什么。因此,我对每一个建议都很高兴! -
如果调用不正确,许多程序会显示用法。这就是这里发生的事情。 -f -l 和 -r 参数看起来是正确的。所以另外两个参数是 pdf 文件和 PPM 根,所以 Christian K 可能是正确的 - 交换两者。我能想到的另一种可能性是用法文本是错误的,在这种情况下,您只需要找到某人或一些讨论来解释真正的命令行语法是什么。
标签: shell batch-file cmd