Using https://tex.stackexchange.com/a/99666 and https://tex.stackexchange.com/a/136653 I think I have been able to generate (using TeX Live 2014, pdfTeX 3.14159265-2.6-1.40.15) a PDF/A-1b compliant pdf as:
\documentclass{article}
\pdfminorversion 4
\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)
>> ]
}
\usepackage{xcolor}
\usepackage{hyperxmp}
\usepackage[pdftex, pdfa]{hyperref}
\hypersetup{%
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}
}
\usepackage{amsmath}
\usepackage{lipsum}
\begin{document}
\tableofcontents
\section {A}
{\color{blue}Hello} World!
\[1+2=3\]
\section {B}
\lipsum
\(1+2=3\)
\begin{align*}
A &= B\\
&= C\\
&= E
\end{align*}
\newpage
\section {C}
\lipsum
\[1+2=3\]
\end{document}
At least, PDFBox Preflight (http://en.wikipedia.org/wiki/Apache_PDFBox) says
The file test.pdf is a valid PDF/A-1b file
And also 3-Heights PDF Validator Online Tool (http://www.pdf-tools.com/pdf/validate-pdfa-online.aspx) is happy.
Now, I would like to use CMYK-colors. So I downloaded an icc profile from http://www.eci.org/en/downloads and tried this modification:
\documentclass{article}
\pdfminorversion 4
\immediate\pdfobj stream attr{/N 4} file{ISOcoated_v2_eci.icc}
\pdfcatalog{%
/OutputIntents [ <<
/Type /OutputIntent
/S/GTS_PDFA1
/DestOutputProfile \the\pdflastobj\space 0 R
/OutputConditionIdentifier (FOGRA39L)
/Info(FOGRA39L)
>> ]
}
\usepackage[cmyk]{xcolor}
\usepackage{hyperxmp}
\usepackage[pdftex, pdfa]{hyperref}
\hypersetup{%
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}
}
\usepackage{amsmath}
\usepackage{lipsum}
\begin{document}
\tableofcontents
\section {A}
{\color{blue}Hello} World!
\[1+2=3\]
\section {B}
\lipsum
\(1+2=3\)
\begin{align*}
A &= B\\
&= C\\
&= E
\end{align*}
\newpage
\section {C}
\lipsum
\[1+2=3\]
\end{document}
Now, PDFBox Preflight complains:
5.2.3 : Forbidden field in an annotation definition, Annotation uses a Color pro
file which isn't the same than the profile contained by the OutputIntent
And 3-Heights PDF Validator Online Tool says:
A device-specific color space (Annotation C or IC) without an appropriate output intent is used.
The document does not conform to the requested standard.
The document contains device-specific color spaces.
However, If I remove the tableofcontents a valid (according to PDFBox Preflight) PDF/A-1b seems to be generated.
What is the problem, and how do I fix it?
UPDATE:
The problem appears to be with hyperref. See the comments. Is it possible to redefine some part of hyperref to avoid the problems?
I would like something like this to work:
\documentclass{article}
\pdfminorversion 4
\pdfcompresslevel=0
\immediate\pdfobj stream attr{/N 4} file{ISOcoated_v2_eci.icc}
\pdfcatalog{%
/OutputIntents [ <<
/Type /OutputIntent
/S/GTS_PDFA1
/DestOutputProfile \the\pdflastobj\space 0 R
/OutputConditionIdentifier (FOGRA39L)
/Info(FOGRA39L)
>> ]
}
\usepackage[cmyk]{xcolor}
\usepackage{hyperxmp}
\usepackage[pdftex, pdfa]{hyperref}
\hypersetup{%
colorlinks = true,
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},
}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsrefs}
\usepackage{lipsum}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\begin{document}
\tableofcontents
\section {A}
{\color{blue}Hello} World!
\begin{theorem}
\label{thm.1}
\begin{equation}
1=1\label{eq.1}
\end{equation}
\end{theorem}
\begin{proof}
By reflexivity of \(=\).
\end{proof}
Theorem \ref{thm.1} is about the equation \eqref{eq.1}.
See also \cite{MR1727844}.
\begin{bibdiv}
\begin{biblist}
\bib{MR1727844}{book}{
author={Bourbaki, Nicolas},
title={Algebra I. Chapters 1--3},
series={Elements of Mathematics (Berlin)},
note={Translated from the French;
Reprint of the 1989 English translation [ MR0979982 (90d:00002)]},
publisher={Springer-Verlag, Berlin},
date={1998},
pages={xxiv+709},
}
\end{biblist}
\end{bibdiv}
\end{document}
linktoc=none
to the hyperref's package options. – DG' Feb 10 '15 at 11:28pdfx
does not help. I think that some solution based on patching ofhyperref
's link making code needed. For example inhpdftex.def
and inhxetex.def
there are following lines: \ifx\@urlbordercolor\relax \else /C[\@urlbordercolor]% \fi I think, one need to "remove" them by somepatchcmd
to get rid of "Annotation C" errors. By the way Word 2010 with it's option to save to pdf/A produces linkable text (links?) that (even colored) either is not annotated or is annotated the way that is causing errors. – Leonid Dec 20 '15 at 10:48