【发布时间】:2017-11-13 17:55:09
【问题描述】:
我有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=$2 $1
但在尝试使用 PDFBox 预检验证结果时出现以下错误:
2.4.3 : 无效的色彩空间,缺少 DestOutputProfile
2.4.3 : 无效的色彩空间,缺少 DestOutputProfile
2.4.3 : 无效的色彩空间,缺少 DestOutputProfile
2.4.3 : 无效的色彩空间,没有色彩配置文件就不能使用运算符“f”
我想我必须告诉 Ghostscript 在输出中使用颜色配置文件,所以我分别尝试了这些参数并一起尝试了
-sOutputICCProfile=/usr/share/color/icc/CoatedFOGRA39.icc -sProfileOut=/usr/share/color/icc/CoatedFOGRA39.icc -sPostRenderProfile=/usr/share/color/icc/CoatedFOGRA39.icc
没有运气(我在该路径中有个人资料)。
我能做什么?
注意:该图是使用 TikZ 构建的,并且是文档的一部分:我实际上希望整个文档都符合要求,但仅在此图上就失败了。
【问题讨论】:
-
在 TeX 方面,罪魁祸首是来自 TikZ 的
shader=interp。删除它,我可以使用上面的第一个命令获得 PDF/A。
标签: gradient pdfbox ghostscript tikz pdfa