Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am validating the following latex document with The 3-Heights™ PDF Validator Online Tool

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

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

The output gives the error:

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

How can I use colors that aren't device specific? Or use the appropriate intent?

share|improve this question
1  
The xcolor package lets you chose the color model, including device independent one. –  mafp Jan 29 '13 at 1:07
    
@mafp I reviewed the documentation provided, which did mention driver-independent access to colors. Which color model is device independent(gray, rgb, HTML, etc.)? –  Ryan Gates Jan 29 '13 at 1:25
1  
I think it is already best explained here: tex.stackexchange.com/a/9973/21591. –  mafp Jan 29 '13 at 9:18
    
@mafp I agree that it has been explained there and in the pdf documentation. I was unable to find a working example that I could use for this scenario. –  Ryan Gates Jan 30 '13 at 1:17

1 Answer 1

up vote 7 down vote accepted
+50

Generating PDFA-1b compatible PDFs is rather difficult with LaTeX. The details are described here: http://support.river-valley.com/wiki/index.php?title=Generating_PDF/A_compliant_PDFs_from_pdftex

If it is just about the color profile, you may use the following piece of code:

\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}

The file sRGBIEC1966-2.1.icm is the color profile you want to use. Please put this file into the same directory your tex document is, so it can be found by pdftex. If you want to make your PDF even more PDFA-1b compliant, you may want to have a look at the pdfx package which has an option for PDFA-1b, too.

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

Please note that PDFs generated by pdftex are not PDFA compatible due to wrong EOL markers.

Update: I just added a complete example that works just fine for me. Please note that I use PDF version 1.4 to prevent compressed streams.

Update2: You can download color profiles from here:

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

and here (SRGB) http://www.color.org/srgbprofiles.xalter

share|improve this answer
    
I tried adding the above code between the \usepackage and \begin, but then I got the error referred to in tex.stackexchange.com/q/71224/17290 –  Ryan Gates Feb 24 '13 at 21:33
    
Are you sure you have the color profile in the same directory of your tex document? –  user26372 Feb 24 '13 at 22:15
    
Wow, amazing. Never saw anything like that. So for a given file, how do I get the exact string that is "sRGB IEC61966-2.1" in this example? Any idea? –  Christian Feb 24 '13 at 22:33
    
Ok, the answer seems to be: you google for your color profile and OutputConditionIdentifier. –  Christian Feb 24 '13 at 22:40
    
Dunno if I get your question right, on Mac/Linux command line: strings FILENAME.pdf | grep sRGB –  user26372 Feb 24 '13 at 22:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.