【发布时间】:2021-07-22 17:25:00
【问题描述】:
使用内联 postscript 语法时出现以下命令错误。可能是语法错误,但可以得到它有什么问题!
命令
"C:\Program Files\gs\gs9.54.0\bin\gswin64c.exe" -dPrinted -dBATCH -dNOPAUSE -dNOSAFER -dNoCancel -dPDFFitPage -c mark "NoCancel true QueryUser 3 OutputFile (%printer%Microsoft Print to PDF) UserSettings <<DocumentName (test)>> (mswinpr2) finddevice putdeviceprops setdevice" -dNORANGEPAGESIZE -f "D:\95c46c9f-0007-415d-99b6-c9ee561821ab.pdf"
例外
GPL Ghostscript 9.54.0 (2021-03-30)
Copyright (C) 2021 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.
Error: /undefined in QueryUser
Operand stack:
--nostringval-- true true
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:740/1123(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.54.0: Unrecoverable error, exit code 1
【问题讨论】:
-
仅用于测试目的,使用 Microsoft Print to PDF。实际上,它应该在实际打印机上静默打印。上面的命令正在使用 c#,但我想使用 gs cli 进行检查。
标签: ghostscript