pdfx package writes into pdf file
You need eciRGB_v2.icc in the working directory.
\documentclass{article}
% ===============================
% Embedding the color profile.
% Requires eciRGB_v2.icc in the working directory
% http://www.eci.org/_media/downloads/icc_profiles_from_eci/ecirgbv20.zip
\pdfminorversion 4
\immediate\pdfobj stream attr{/N 3} file{eciRGB_v2.icc}
\pdfcatalog{%
/OutputIntents [ <<
/Type /OutputIntent
/S/GTS_PDFA1
/DestOutputProfile \the\pdflastobj\space 0 R
/OutputConditionIdentifier (eciRGB v2)
/Info(eciRGB v2)
>> ]
}
\usepackage{xcolor}
\usepackage{hyperxmp}
\usepackage[pdftex, pdfa, linktoc=none]{hyperref}
% ----------------------------------------------
% Add metadata
\hypersetup{%
pdftitle={Sample LaTeX input file},
pdfauthor={Das war KOMA},
pdfsubject={Thema},
pdfkeywords={pdfTeX, PDF/X-1a, PDF/A-b},
pdflang={de},
bookmarksopen=true,
bookmarksopenlevel=3,
hypertexnames=false,
linktocpage=true,
plainpages=false,
breaklinks
}
\begin{document}
Hello world!
\end{document}