I'm trying to generate a PDF/A using pdflatex and pdfx and want the PDF meta data populated with the values I specify in the .xmpdata file.

My problem is, that the author and keyword information is not written into the PDF meta data, while this works just fine for title and subject.

Here's a MWE to demonstrate my problem, pretty similar to what the pdfx documentation shows.

\Title{Baking through the ages}
\Author{A. Baker}
\Keywords{cookies\sep muffins\sep cakes}
\Publisher{Baking International}
\Subject{The Subject}


First line

Author: \pdfx@Author

Keywords: \pdfx@Keywords

Subject: \pdfx@Subject

Title: \pdfx@Title

last line.

If you check the PDF properties, the lines for author and keywords are empty, which I find not very intuitive, given that subject and title is filled. This might be related to the use of \sep in the author and keyword fields, but it does not make a difference if you actually use it or not (see MWE).

I'm using an up-to-date Manjaro Linux with texlive. My PDF viewer is evince.

I found the following workaround, which is probably horribly hacky, but works for me:

\def\sep{; }

When I insert this before \begin{document}, the behaviour is as expected and all fields are filled.

Alternatively I could specify the same things again using \pdfinfo{...}, but I don't understand why I would need to do this again.

Maybe someone can explain what is going on or if this is a bug in pdfx. Thanks.

  • I have the same error, and I can confirm that the workaround is working. Thanks for that :) (Using texlive 2017 under ubuntu) – Luis Aug 13 '18 at 20:10
  • With your MWE processed by TeX Live 2018 (Ubuntu 18.04) as well as MikTeX 2.9 (Windows), Evince shows no entries for the fields complained about, but Adobe Acrobat Reader does. – s4ndm4n Sep 17 '18 at 15:15

I recommend the following way without pdfx to get your MWE working:

%\pdfobjcompresslevel=0 %uncomment for Texlive

\usepackage{mmap} %only needed for pdfTeX

\title{Baking through the ages}
\subtitle{The Subject}
\author{A. Baker, A. Companion}

    pdfpublisher={Baking International}

\immediate\pdfobj stream attr{/N 3} file{sRGB.icc}
  /OutputIntents [
      /Type /OutputIntent
      /S /GTS_PDFA1
      /DestOutputProfile \the\pdflastobj\space 0 R
      /OutputConditionIdentifier (sRGB)
      /Info (sRGB)


First line

Author: \@author

Keywords: \stichworte

Subject: \@subtitle

Title: \@title

last line.

I can't speak for pdfx but reusing variables can break things also with other packages. Thus it's better to create a new command for those entries that don't belong to the title page as done with \stichworte in this MWE.

  • Note, the documentation for hyperxmp explicitly says to load it before hyperref. – Noldorin Jan 15 at 4:40
  • fixed. It makes only a difference in rare cases. – tanGIS Jan 16 at 18:38
  • Yep, I'm sure that's the case. Just thought I'd mention it anyway because it's in the docs. :-) BTW, for anyone curious, pass the keeppdfinfo option to hyperref to include the usual author and keywords metadata info. I wondered for a while why it was missing. – Noldorin Jan 16 at 18:56

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.