PDF/A Ghostscript 中的兼容性处理颜色渐变

PDF/A compatibility processing color gradients in Ghostscript

我有 this PDF image,其中包含颜色渐变。我想用 Ghostscript 9.22 将它转换为 PDF/A。我的命令是

gs -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -dSAFER -sColorConversionStrategy=UseDeviceIndependentColor -dCompressFonts=true -dEmbedAllFonts=true -dPDFA -dPDFACompatibilityPolicy=1 -dDetectDuplicateImages=true -dFastWebView=true -sOutputFile= 

但是在尝试使用 PDFBox 预检验证结果时出现以下错误:

2.4.3 : Invalid Color space, DestOutputProfile is missing

2.4.3 : Invalid Color space, DestOutputProfile is missing

2.4.3 : Invalid Color space, DestOutputProfile is missing

2.4.3 : Invalid Color space, The operator "f" can't be used without Color Profile

我想我必须告诉 Ghostscript 在输出中使用颜色配置文件,所以我分别和一起尝试了这些参数

-sOutputICCProfile=/usr/share/color/icc/CoatedFOGRA39.icc -sProfileOut=/usr/share/color/icc/CoatedFOGRA39.icc -sPostRenderProfile=/usr/share/color/icc/CoatedFOGRA39.icc

运气不好(我有那个路径的配置文件)。

我能做什么?

注意:该图是用TikZ构建的并且是文档的一部分:我实际上希望整个文档都符合要求,但它在这个图上失败了.

您还没有指定 PDFA_def.ps 文件。这是一个要求,它不是可选的,您必须编辑内容才能正确。您只能使用 PDFA_def.ps 文件(基本上是一堆 pdfmarks)中概述的方法指定 DestOutputProfile。

记录了这些步骤here

我不确定,但我不会使用 FastWebView 创建 PDF/A 文件,我不确定线性化文件是否可以 PDF/A 兼容。反正也多多少少没有意义。