【发布时间】:2020-03-07 21:08:43
【问题描述】:
我尝试使用下一个参数:
'-dPDFA=2 ' +
'-dBATCH ' +
'-DNOSAFER ' +
'-dNOPAUSE ' +
'-sColorConversionStrategy=UseDeviceIndependentColor ' +
'-sDEVICE=pdfwrite ' +
'-dPDFACompatibilityPolicy=1 ' +
'-o ./temp.pdf' +
'./PDFA_def.ps' +
'./out/temp.pdf'
我的 PDFA_def.ps 如下所示:
%!
% This is a sample prefix file for creating a PDF/A document.
% Users should modify entries marked with "Customize".
% This assumes an ICC profile resides in the file (srgb.icc),
% in the current directory unless the user modifies the corresponding line below.
% Define entries in the document Info dictionary :
% Define an ICC profile :
/ICCProfile (/Users/user/nestjs/ISOcoated_v2_300_eci.icc) % Customise
def
[/_objdef {icc_PDFA} /type /stream /OBJ pdfmark
%% This code attempts to set the /N (number of components) key for the ICC colour space.
%% To do this it checks the ColorConversionStrategy or the device ProcessColorModel if
%% ColorConversionStrategy is not set.
%% This is not 100% reliable. A better solution is for the user to edit this and replace
%% the code between the ---8<--- lines with a simple declaration like:
%% /N 3
%% where the value of N is the number of components from the profile defined in /ICCProfile above.
%%
[{icc_PDFA}
<<
>> /PUT pdfmark
[{icc_PDFA} ICCProfile (r) file /PUT pdfmark
% Define the output intent dictionary :
[/_objdef {OutputIntent_PDFA} /type /dict /OBJ pdfmark
[{OutputIntent_PDFA} <<
/Type /OutputIntent % Must be so (the standard requires).
/S /GTS_PDFA1 % Must be so (the standard requires).
/DestOutputProfile {icc_PDFA} % Must be so (see above).
/OutputConditionIdentifier (ISO Coated v2 300% (ECI)) % Customize
>> /PUT pdfmark
[{Catalog} <</OutputIntents [ {OutputIntent_PDFA} ]>> /PUT pdfmark
我在寻找解决方案时下载的 ISOcoat_v2_300_eci.icc。 我尝试使用 gs/lib/iccprofiles/ 中的默认 iccs 我尝试使用 -sColorConversionStrategy RGB, CMYK, Gray 而不是 UseDeviceIndependentColor 它没有帮助。 对话成功结束,Ghostscript 不会抛出任何错误。但是当我在 veraPDF 中验证结果文件时,我得到了关注 report(html 文件)。
你对我有什么想法吗?
更新
【问题讨论】:
标签: pdf ghostscript pdfa