【发布时间】:2014-11-25 02:56:10
【问题描述】:
我尝试了几个小时,但没有得到好的结果。我需要通过命令行打印 PDF 文档,我选择了 Ghostscript 来完成这项艰巨的工作。我正在使用我的参数创建一个名为 config.cfg 的文件并将其传递给 Ghostscript。我的 Ghostscript 安装路径是 C:\Program Files\gs\gs9.15\bin,我正在使用可执行文件 gswin64c 进行测试。我的配置文件如下:
config.cfg
"C:\pdf\pdf\type_theory.pdf"
-colour
-noquery
-printer "Work Printer"
-ghostscript "C:\Program Files\gs\gs9.15\bin\gswin64c.exe"
-all
-portrait
-copies 1
我正在通过命令行调用:
gswin64c -config "C:\\pdf\\pdf\\config.cfg"
但我在输出中收到以下错误:
GPL Ghostscript 9.15 (2014-09-22)
Copyright (C) 2014 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefined in C:\\pdf\\pdf\\postscript.cfg
Operand stack:
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:1188/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
我可以通过最后一句话理解它缺少文件,但我不知道它是什么。有人可以帮我找出我的错误吗?
【问题讨论】:
标签: pdf ghostscript