2012-09-26 119 views
0

我從命令行使用Ghostscript來減小PDF文件的大小。我米試圖命令是使用Ghostscript減少PDF文件大小

gswin64c -sDEVICE=pdfwrite -dCompatibilityLevel=1.4^
     -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET ^
     -dBATCH -sOutputFile=C:\output.pdf C:\input.pdf 

的input.pdf是我的C:\盤

我收到以下錯誤

Could not open file C:\output.pdf 
Unable to open the initial device, quitting 

任何encoutered這個問題之前能幫幫我嗎?

回答

0

上述錯誤的解決方案是您輸出文件的權限。如果您在output.pdf目錄中沒有寫權限,您將遇到上述錯誤。所以在執行命令之前,請確保您具有寫權限。

希望它能幫助別人 謝謝