I'd like to generate a PDF/A-compliant document. Thus I need to embed the metadata using XMP but somehow the following MWE doesn't work.
\RequirePackage{pdf14}
\documentclass{article}
\usepackage[a-1b]{pdfx}
\newcommand{\Subject}[1]{\gdef\xmpSubject{#1}}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.xmpdata}
\Subject{Foo}
\Title{My Sample Title}
\Author{Me}
\end{filecontents*}
\begin{document}
Foobar
\end{document}
How can I fix this and what's up with packages like hyperxmp?
Best Answer
Your provided example works fine for me. Therefore, I have to assume there is some confusion about the XMP Metadata and/or the process on how to typeset the document.
First of all, XMP metadata is not the PDF metadata, e.g. XMP data can be viewed by using Adobe Acrobat: File, Properties, Additional Metadata; whereas the normal metadata already shows up under file, properties.
Secondly: Do you use pdflatex to create your document?