我使用以下命令使用GhostScript检查损坏的pdf文件:
gswin64c.exe -o nul -sDEVICE=nullpage input.pdf我在屏幕上得到了以下输出:
Processing pages 1 to 2.
Page 1
*****Error reading a content stream. The page may not be incomplete.
Page 2
*****Warning: File has insufficient data for an image.
*****This file had errors that were repaired or ignored.这些信息正是我所需要的,但我需要在文本文件中输出此信息,因为我将不得不处理大量文件。
我尝试使用以下命令:
gswin64c.exe -o outputfile.txt -sDEVICE=txtwrite input.pdf但是输出文件是空的。
如何将这些信息输出到文件中?
发布于 2014-09-30 22:19:10
尝试将stdout and stderr重定向到文件
例如:
gswin64c.exe -o nul -sDEVICE=nullpage input.pdf > output.txt 2> errors.txthttps://stackoverflow.com/questions/26123112
复制相似问题