我在Windows系统上使用ghostscript 9.19。 当我从批处理文件运行ghostscript时,它创建pdf。 当ghostscript从程序计划时,它会创建一个没有内容的pdf - 只有一个空白页面。 的命令行是在两种情况下是相同的(一个龙线,下面分裂由于格式化):从未被创建ghostscript转换为pdf-a-icc文件是否正确?
gswin32c.exe -sstdout=d:\my_data\gs_stdout.log
-dPDFA=1 -dBATCH -dNOPAUSE -dNOOUTERSAVE
-sColorConversionStrategy=/RGB
-sOutputICCProfile=d:\my_ps_files\AdobeRGB1998.icc
-sDEVICE=pdfwrite
-sOutputFile=d:\my_data\my_hopeful_pdfa_pdfa.pdf
-dPDFACompatibilityPolicy=1 "d:\my_ps_files/PDFA_def.ps" "d:\my_data\my_hopeful_pdfa_pdfa.ps"
> d:\my_data\my_hopeful_pdfa_gs_out.log
my_hopefule_pdfa_gs_out.log。但gs_stdout.log确实被创建。
无论是PDF格式被创建似乎关系到* .icc文件是否不存在的目录中ghostscript的运行。
我得到的stdout.log文件不同的输出。
当它工作,我得到:
GPL Ghostscript 9.19 (2016-03-23)
Copyright (C) 2016 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefinedfilename in (>)
Operand stack:
false
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:1201/1684(ro)(G)-- --dict:0/20(G)-- --dict:80/200(L)--
Current allocation mode is local
Last OS error: Invalid argument
当它失败的错误日志:
GPL Ghostscript 9.19 (2016-03-23)
Copyright (C) 2016 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefinedfilename in --file--
Operand stack:
--nostringval-- --nostringval-- (AdobeRGB1998.icc) (r)
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1967 1 3 %oparray_pop 1966 1 3 %oparray_pop 1950 1 3 %oparray_pop 1836 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1201/1684(ro)(G)-- --dict:0/20(G)-- --dict:79/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 818
有人可以帮我解释这个输出。 AdobeRGB1988.icc在这两种情况下驻留在d:\ my_ps_files \ AdobeRGB1998.icc作为在命令行指定。
您在'/ PDFA_def.ps'处使用正斜杠,该斜杠不是正常的Windows路径分隔符。尝试用反斜杠代替它。另一点是,从程序启动时,环境变量可能会有所不同,但不知道程序以什么方式启动它,这很难说。 –