设备独立颜色

设备独立颜色

我正在验证以下乳胶文档3-Heights™ PDF 验证器在线工具

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage[rgb]{xcolor}

\begin{document}
\textcolor{blue}{This is only a test}
\end{document}

输出给出错误:

A device-specific color space (DeviceRGB) without an appropriate output intent is used.

我如何使用非设备特定的颜色?或者使用适当的意图?

答案1

使用 LaTeX 生成兼容 PDFA-1b 的 PDF 相当困难。详细信息如下:http://support.river-valley.com/wiki/index.php?title=Generating_PDF/A_compatible_PDFs_from_pdftex

如果只是关于颜色配置文件,您可以使用以下代码:

\pdfminorversion=4
\documentclass{minimal}
\usepackage[rgb]{xcolor}

\immediate\pdfobj stream attr{/N 3}  file{sRGBIEC1966-2.1.icm}
\pdfcatalog{%
/OutputIntents [ <<
/Type /OutputIntent
/S/GTS_PDFA1
/DestOutputProfile \the\pdflastobj\space 0 R
/OutputConditionIdentifier (sRGB IEC61966-2.1)
/Info(sRGB IEC61966-2.1)
>> ]
}

\begin{document}
\textcolor{blue}{This is only a test}
\end{document}

文件 sRGBIEC1966-2.1.icm 是您要使用的颜色配置文件。请将此文件放入您的 tex 文档所在的同一目录中,以便 pdftex 可以找到它。如果您想让您的 PDF 更加符合 PDFA-1b 标准,您可能需要查看 pdfx 包,它也有一个适用于 PDFA-1b 的选项。

http://ctan.org/tex-archive/macros/latex/contrib/pdfx/

请注意,由于错误的 EOL 标记,pdftex 生成的 PDF 与 PDFA 不兼容。

更新:我刚刚添加了一个对我来说运行良好的完整示例。请注意,我使用 PDF 版本 1.4 来防止压缩流。

更新2:您可以从这里下载颜色配置文件:

Adobe(SRGB 和 CMYK):http://www.adobe.com/digitalimag/adobergb.html

这里 (SRGB)http://www.color.org/srgbprofiles.xalter

相关内容