When a LaTeX document contains TikZ figures with color gradients, it seems that Acrobat Pro's preflight function can no longer convert the PDF to comply with the PDF/A-1b standard.

For instance, the code

  \tikz  \draw [left color=green, right color=blue] (0, 0) rectangle (1, 1);

produces a rectangle with green-to-blue color gradient,

Color gradient in TikZ

which results in two PDF/A compliance errors ("Syntax problem: real value out of range"), namely "Largest positive real number used: 32768.0" and "Largest negative real number used: -32768.0". The screenshot below indicates that this might be related to a bounding box problem.

At http://www.callassoftware.com/callas/doku.php/en:products:pdftoolbox:all_features:properties is says with respect to "Largest positive real number used" that "In many environments the valid range is limited to the values as defined by IEEE for single-precision floating-point numbers. This limits the range to: +/- 32,767."

Is there a way to fix this problem and to obtain a PDF/A file?

EDIT: When I add a non-unity opacity value to the TikZ \draw options, such as "opacity=0.9999", one of the errors ("Largest positive real number used: 32768.0") disappears.

Preflight "Verify compliance with PDF/A"

  • 9
    Just an idea: PDF/A-1 defaults to PDF 1.3, so it does not support transparency. opacity sounds like it uses transparency features... – Martin Schröder May 20 '14 at 13:20
  • I could not recreate these compliance errors, but got a few others for your MWE :) see imgur.com. (Could be due to the old acrobat version?) – Harald Sep 19 '14 at 9:58

Using TeX Live 2014, pdfTeX 3.14159265-2.6-1.40.15, I don't seem to run into these problems. Maybe updating your TeX-system can solve the problems.

Here is a modification of your MWE that embeds a color profile and metadata (I don't have access to Adobe's Preflight tool or other software that can do this in a post-processing step). Information on how to embed this extra data was found in https://tex.stackexchange.com/a/99666 and https://tex.stackexchange.com/a/136653. The color profile can be downloaded from http://www.color.org/srgbprofiles.xalter.

\pdfminorversion 4
\immediate\pdfobj stream attr{/N 3} file{sRGB_IEC61966-2-1_black_scaled.icc}
/OutputIntents [ <<
/Type /OutputIntent
/DestOutputProfile \the\pdflastobj\space 0 R
/OutputConditionIdentifier (sRGB IEC61966-2-1 black scaled)
/Info(sRGB IEC61966-2-1 black scaled)
>> ]
\usepackage[pdftex, pdfa]{hyperref}
    pdfauthor          = {a},
    pdfkeywords        = {a, b, c},
    pdflang            = {en},
    pdftitle           = {a},
    pdfsubject         = {a},
  pdfcaptionwriter   = {a},
  pdfcontactaddress  = {a},
  pdfcontactcity     = {a},
  pdfcontactcountry  = {a},
  pdfcontactemail    = {a},
  pdfcopyright       = {a},
  pdfmetalang        = {en}
  \tikz  \draw [left color=green, right color=blue] (0, 0) rectangle (1, 1);

PDFBox Preflight (http://en.wikipedia.org/wiki/Apache_PDFBox) and 3-Heights PDF Validator Online Tool (http://www.pdf-tools.com/pdf/validate-pdfa-online.aspx) says what I get from this is a valid PDF/A-1b file.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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