1
我使用GhostScript的檢查使用以下命令損壞的PDF文件:GhostScript的輸出到文件
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
但OUTPUTFILE是空的。
如何將這些信息輸出到文件中?
謝謝 - 這正是我所需要的。有沒有簡單的方法將文件名添加到stdout和stderr? – user2105030 2014-09-30 15:56:06
取決於您如何獲得輸入文件名,請嘗試使用您用來決定處理哪個文件的相同機制,但是會附加一個.txt或.err文件。 – gbjbaanb 2014-09-30 17:08:50