6

I am not completely sure whether this is even supposed to work, but reading the documentation of pdfx it is my understanding that while PDF/A by default uses a RGB profile, it is possible to specifically ask for a CMYK profile. The manual says the following (p. 12): "For users who have a specific color profile they wish to use, it is possible to do so by including a \setRGBcolorprofile or \setCMYKcolorprofile command in the .xmpdata file."

I tried the following MWE:

\RequirePackage{filecontents}
 \begin{filecontents*}{\jobname.xmpdata}
 \setCMYKcolorprofile{coated_FOGRA39L_argl.icc}
                     {Coated FOGRA39}
                     {FOGRA39 (ISO Coated v2 300\% (ECI))}
                     {http://www.argyllcms.com/}
        \Title{Title}
        \Author{Author\sep}
        \Language{de-DE}
        \Keywords{keyword1\sep keyword2\sep keyword3}
        \Publisher{Publisher}
      \end{filecontents*}
\documentclass[]{scrbook}

\usepackage[a-3b]{pdfx}

\begin{document}
Test
\end{document}

While this is a valid PDF/A according to Adobe Acrobat – the preflight test does not produce an error – the color profile used is IEC sRGB. And if I actually include CMYK images, it does not pass as proper PDF/A since the color profiles of the PDF and the included image differ.

pdfx simply seems to ignore the color profile set in the .xmpdata file.

Simifilm
  • 3,168
  • 23
  • 29

2 Answers2

4

You can force the output intent with :

\RequirePackage{filecontents}
 \begin{filecontents*}{\jobname.xmpdata}
 \setCMYKcolorprofile{coated_FOGRA39L_argl.icc}
                     {Coated FOGRA39}
                     {FOGRA39 (ISO Coated v2 300\% (ECI))}
                     {http://www.argyllcms.com/}
        \Title{Title}
        \Author{Author\sep}
        \Language{de-DE}
        \Keywords{keyword1\sep keyword2\sep keyword3}
        \Publisher{Publisher}
      \end{filecontents*}
\documentclass[]{scrbook}

\usepackage[a-3b]{pdfx}

% -- snipp --

\immediate\pdfobj stream attr{/N 4} file{coated_FOGRA39L_argl.icc}
\pdfcatalog{%
/OutputIntents [ <<
/Type /OutputIntent
/S/GTS_PDFA1
/DestOutputProfile \the\pdflastobj\space 0 R
/OutputConditionIdentifier (Coated FOGRA39)
/Info(FOGRA39L)
>> ]
}

% -- snapp -- 

\begin{document}
Test
\end{document}

But preflight will complain, that the output intent isn't RGB

DG'
  • 21,727
  • Thanks, but what does this actually mean? That PDF/A can't, by definition, be CMYK, that pfdx is unable to produce a proper file, or that preflight is wrong? And what about the part in the pdfx documentation where they recommend the solution I chose in my MWE? EDIT: Where do I have to put this code snippet? I am unable to compile this … – Simifilm Dec 10 '18 at 09:32
  • Well, if you look at the source of pdfx, you will find, that cmyk is disabled for pdf/a and pdf/e. I have no idea, why Adobe Acrobat's preflight insists on RGB, since CMYK is explicitly allowed: https://www.pdfa.org/pdfa-and-colors – DG' Dec 10 '18 at 09:41
  • 4
    I just realised that the name of the profile file given in the pdfx doc is actually wrong. The file installed by package colorprofiles is FOGRA39L_coated.icc, not coated_FOGRA39L_argl.icc. After correcting this, the file compiles flawlessly. But preflight does indeed complain although the output profile is now set correctly. – Simifilm Dec 10 '18 at 09:50
  • @Simifilm Thanks, that helped a lot! I bet it changed names at some point. – Noldorin Jan 18 '21 at 23:11
2

… preflight will complain, that the output intent isn't RGB

If it does not pass at least one validator it's probably not a solution. In this answer about CMYK PDF/A I showed how to produce a valid PDF/A with and without hyperlinks. The solution is to avoid pdfx because, as you already found out, it has numerous bugs.

if I actually include CMYK images, it does not pass as proper PDF/A since the color profiles of the PDF and the included image differ

You can include both RGB and CMYK images and graphics in a PDF/A. But they must be colour managed. Imagine a CMYK document with an embedded image that comes with three colour values per pixel: That must throw an error.

  • The state-of-the-art solution is to embed graphics that are already PDF/A because this forces both colour management and accessible metadata.

  • You can include RGB .jpg images with an embedded .icc profile but the metadata will not be PDF/A compliant. Some validators will complain, Acrobat by default will not (but you can enable embedded documents metadata checking in preflight settings).

  • What does not work is embedding .png because those don't support neither embedded image profiles nor CMYK.

  • You could embed CMYK .jpg images without a profile but that does not make much sense. Embed PDF vector graphics instead or PDF raster graphics. Those support lossless compression.

tanGIS
  • 1,645
  • 15
  • 32