有人告诉我,Ghostscript是缩小PDF文件大小的最佳工具。我安装了GNU Ghostscript 7.07。我通过PHP使用它,代码如下:
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 发布于 2011-09-12 22:06:37
你的Ghostscript版本太旧了,你当然应该从升级开始,当前发布的版本是9.04。
https://stackoverflow.com/questions/7366996
复制相似问题