后记为PDF,带有EPS参考

问题描述 投票:0回答:1

我正在尝试通过Ghostscript(版本9.52)将PS文件转换为PDF。我的问题是PS文件引用了外部EPS文件,这是徽标文件,通常在打印机内存中。我也有此EPS文件的来源。当使用随Ghostscript安装的“ ps2pdf”脚本时,加载EPS文件时出现错误。 EPS加载的代码如下:

/showpage {} def
/setpagedevice  /pop load def
(logo.eps)          run
restore

当我运行'ps2pdf'时,显示以下错误:

Error: /invalidfileaccess in --run--
Operand stack:
   --nostringval--   (logo.eps)   (r)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   run   --nostringval--   2   %stopped_push   --nostringval--   run   run   false   1   %stopped_push   1990   1   3   %oparray_pop   1989   1   3   %oparray_pop   1977   1   3   %oparray_pop   1833   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   run   --nostringval--   2   %stopped_push   --nostringval--   1990   2   3   %oparray_pop   run
Dictionary stack:
   --dict:739/1123(ro)(G)--   --dict:0/20(G)--   --dict:82/200(L)--
Current allocation mode is local

关于将带有EPS参考的PS文件转换为PDF的任何建议?

pdf ghostscript postscript eps
1个回答
0
投票

如最近发布的notes中所指出的(并警告了数年),Ghostscript现在附带SAFER作为默认值。

启动SAFER后,PostScript文件操作符将被禁用,并且将失败并显示无效的文件访问错误。您需要设置-dNOSAFER(建议使用NOT),或者将要访问的文件添加到可访问文件列表中,s9的读写分别进行处理。]]

这已在文档中进行了介绍,您可以在线找到它here(在该链接的页面下方找到-dSAFER),或在ghostpdl / doc / Use.htm中本地找到它

© www.soinside.com 2019 - 2024. All rights reserved.