0
我被告知Ghostscript是縮小PDF文件的最佳工具。我安裝了GNU Ghostscript 7.07。我用下面的代碼中使用它通過PHP:Ghostscript錯誤
system("gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4
-dNOPAUSE -dQUIET -dBATCH -dPDFDEBUG -sOutputFile=output.pdf document.pdf");
對於它完美一些文件,但對於一些其他的輸出文件無效,或有沒有別的白色的頁面。是否因爲版本?
我得到一個錯誤信息:
Error:
/syntaxerror in readxref Operand stack: Execution stack: %interp_exit
.runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push
--nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3
%oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval--
--nostringval-- --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1064/1123(ro)(G)-- --dict:0/20(G)-- --dict:93/200(L)-- --dict:93/200(L)--
--dict:97/127(ro)(G)-- --dict:229/230(ro)(G)-- --dict:14/15(L)--
Current allocation mode is local