【发布时间】:2020-07-04 23:17:06
【问题描述】:
尝试通过“运行”命令将外部 PostScript 文件导入另一个文件,如下所示:
(
save
%showpage {} bind def
("E:/My Documents/Development/Visual Studio 2017/Projects/ITL/SphereITL/SphereITL/ReportITL2/SphereItl/4_postscript/graphs.ps") run
restore)
目录和文件都正确。尝试了双反斜杠格式以及正斜杠,带引号和不带引号。还是报错。
我错过了什么?
这是 Ghostscript 的输出:
GSview 5.0 2012-01-17
GPL Ghostscript 9.52 (2020-03-19)
Copyright (C) 2020 Artifex Software, Inc. All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Displaying DSC file E:/My Documents/Development/Visual Studio 2017/Projects/ITL/SphereITL/SphereITL/ReportITL2/SphereItl/4_postscript/TM-30_Test1.PS
Displaying page 1
Loading NimbusSans-Regular font from %rom%Resource/Font/NimbusSans-Regular... 4376704 2870251 3628128 2298817 2 done.
Loading NimbusMonoPS-Regular font from %rom%Resource/Font/NimbusMonoPS-Regular... 4442816 3088087 3729128 2389676 2 done.
Loading C059-Italic font from %rom%Resource/Font/C059-Italic... 4670528 3335974 3749328 2397028 2 done.
Displaying page 2
Displaying page 3
Displaying page 4
Displaying page 5
Error: /undefined in @
Operand stack:
(\nsave\n%showpage {} bind def\n\("E:/My Documents/Development/Visual Studio 2017/Projects/ITL/SphereITL/SphereITL/ReportITL2/SphereItl/4_postscript/graphs.ps"\) run\nrestore)
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 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-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:744/1123(ro)(G)-- --dict:0/20(G)-- --dict:179/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
--- Begin offending input ---
%%Page: 5 5
%%BeginPageSetup
showHeader
showNVLAPLogo
showFooter
gsave
% Formatting definitions
[ /Courier
0.133
10.00
0.65 9.45
(ABSOLUTE)
0
0
[
(REPORT NUMBER: TM-30_Test1 Page 5 of 6)
(DATE: 07/26/13)
(PREPARED FOR: APPALACHIAN LIGHTING SYSTEMS, INC.)
(CATALOG NUMBER: SL5-02 )
()
] ] prlines
(
save
%showpage {} bind def
("E:/My Documents/Development/Visual Studio 2017/Projects/ITL/SphereITL/SphereITL/ReportITL2/SphereItl/4_postscript/graphs.ps") run
restore)
@%showpage
--- End offending input ---
file offset = 13167
gsapi_run_string_continue returns -101
【问题讨论】:
-
ghostscript 是这样说的:第 5 页错误:“/undefined in @”所以删除 @。请阅读 Adobe 蓝皮书、绿皮书和红皮书以了解更多 PostScript。
-
谢谢 - 我确实找到了 @ 字符并将其删除 - 文件/目录错误已解决,但我仍然无法使用运行命令显示外部 postscript 文件。