将后记转换为 pdf

Converting postscript to pdf

正在关注

Converting correctly pdf to ps and vice-versa

我使用以下命令将 postscript 文件转换为 pdf:

gs   -o output.pdf   -sDEVICE=pdfwrite   -dPDFSETTINGS=/prepress   -dHaveTrueTypes=true   -dEmbedAllFonts=true   -dSubsetFonts=false   -c ".setpdfwrite <</NeverEmbed [ ]>> setdistillerparams"   -f mu-calc.ps

但是我得到了一个错误(我得到了与 ps2pdf 相同的错误):

GPL Ghostscript 9.06 (2012-08-08) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Error: /undefinedfilename in (mu-calc.ps) Operand stack:

Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval--
--nostringval-- false 1 %stopped_push Dictionary stack: --dict:1167/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)-- Current allocation mode is local Last OS error: Permission denied GPL Ghostscript 9.06: Unrecoverable error, exit code 1

我在

尝试了各种其他选项

Ghostscript: "Unrecoverable error: undefinedfilename in setpagedevice"

但我总是遇到同样的错误。

我怎样才能让它发挥作用?

原来文件 mu-calc.ps 在 Linux 机器上没有访问权限。

错误信息

/undefinedfilename

不准确,但正如上面的评论所解释的那样,这是因为后记语言的时代。那时候的文件系统是没有文件权限的。

存在权限问题。使用管理员权限打开命令提示符。