首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ghostscript错误

Ghostscript错误
EN

Stack Overflow用户
提问于 2011-09-10 04:19:11
回答 1查看 712关注 0票数 0

有人告诉我,Ghostscript是缩小PDF文件大小的最佳工具。我安装了GNU Ghostscript 7.07。我通过PHP使用它,代码如下:

代码语言:javascript
复制
system("gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 
   -dNOPAUSE -dQUIET -dBATCH -dPDFDEBUG -sOutputFile=output.pdf document.pdf");

对于某些文件,它可以很好地工作,但对于另一些文件,输出文件要么无效,要么只有一个没有其他内容的白页。会不会是因为版本的原因?

我收到一条错误消息:

代码语言:javascript
复制
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 
EN

回答 1

Stack Overflow用户

发布于 2011-09-12 22:06:37

你的Ghostscript版本太旧了,你当然应该从升级开始,当前发布的版本是9.04。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7366996

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档