我有一个 postscript 文件,它具有大量的打印机驱动程序设置依赖性。我正在尝试将打印机设置捆绑到我的 postscript 打印文件中并将其传递给打印机。直通与 `lpr -l 一起工作得很好。但我无法将 ppd 中的一些选项直接带入 postscript 文件。
施乐 pdd 文件被剪断
*OpenUI *OutputMode/Print Quality: PickOne
*OrderDependency: 46.0 AnySetup *OutputMode
*DefaultOutputMode: HighSpeed
*OutputMode HighSpeed/High Speed: "
<</PostRenderingEnhance true
/PostRenderingEnhanceDetails currentpagedevice
1 index get 1 dict copy
dup /Type 33 put
dup /OutputMode (high-speed) put
>> setpagedevice
"
*End
*OutputMode HighQuality/High Quality: "
<</PostRenderingEnhance true
/PostRenderingEnhanceDetails currentpagedevice
1 index get 1 dict copy
dup /Type 33 put
dup /OutputMode (highest-quality) put
>> setpagedevice
"
*End
*OutputMode HighResolution/High Resolution: "
<</PostRenderingEnhance true
/PostRenderingEnhanceDetails currentpagedevice
1 index get 1 dict copy
dup /Type 33 put
dup /OutputMode (highest-resolution) put
>> setpagedevice
"
*End
*CloseUI: *OutputMode
当我将最高分辨率的部分放在 %%BeginPrelog 部分的开头时,我得到一个无效文件:
<</PostRenderingEnhance true
/PostRenderingEnhanceDetails currentpagedevice
1 index get 1 dict copy
dup /Type 33 put
dup /OutputMode (highest-resolution) put
>> setpagedevice
当我通过 ps2pdf 评估文件的正确性时,出现以下错误:
Error: /undefined in --get--
Operand stack:
--nostringval-- PostRenderingEnhance true PostRenderingEnhanceDetails --dict:210/309(ro)(L)-- PostRenderingEnhanceDetails
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --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:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)--
Current allocation mode is local
Current file position is 308
GPL Ghostscript 9.50: Unrecoverable error, exit code 1
尽管如此,这篇文章中的 setpagedevice 选项工作得很好: 如何选择 PostScript 打印机输出托盘
所以我不知道如何将 ppd 选项转换为有效的 postscript 代码。有没有人在这里有一个线索,如何获得一个有效的后记文件?