3

I am trying to get the metadata to work with my PDF/A compliant document.

For some reason, only the title and subject show up.

I am using Overleaf to compile.

enter image description here

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% DEFINE THE METADATA REQUIRED FOR PDF/A %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pdfinfo{
  /Author (Author Name)
  /Title (Title Here)
  /Subject (PhD Thesis)
  /Keywords (Keyword1, Keyword2)
  /Publisher (Publisher here)
}

%%%%%%%%%%%%%%%%%%%%%%%%%
%%% DOCUMENT PREAMBLE %%%
%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[letterpaper, hidelinks, oneside, 12pt]{report}
\usepackage[letterpaper, left=1.5in, top=1in, bottom=1in, right=1in, nohead, includefoot]{geometry}
\usepackage[toc, page]{appendix}
\usepackage{setspace}
\usepackage{array}
\usepackage{color}
\usepackage{cancel}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{acronym} 
\usepackage{amssymb}
\usepackage{bm}
\usepackage{multirow}
\usepackage{enumitem}
\usepackage{booktabs}
\usepackage[a-3b]{pdfx}
\usepackage{parskip}
\usepackage{calc}

\begin{document}
Words
\end{document}

EDIT

As mentioned regarding pdfx I have also tried the following instead of the pdfinfo technique; however, NO metadata shows up.

\begin{filecontents*}{Thesis.xmpdata}
    \Title{Title Here}
    \Author{Author Name}
    \Subject{Subj Here}
    \Keywords{Keyword1 \sep Keyword2}
\end{filecontents*}
Shinobii
  • 539
  • Sure, I added \begin{document} and \end{document}. That should be all that's needed. I use every package listed as far as I can recall. – Shinobii Jan 08 '20 at 19:18
  • You don't get a pdf from your document. And the question is not if you use the packages but if they are relevant for your problem. – Ulrike Fischer Jan 08 '20 at 19:35
  • 2
    Right! I added some words to output a PDF. I know that there are often conflicts between packages; hence, I included all packages that I used for my thesis. I hope that makes sense and I understand you correctly. – Shinobii Jan 08 '20 at 19:49
  • 1
    This question is rather more complicated than you seem to realize. Firstly, including the pdfx package is not sufficient to make your output PDF/A compliant; it makes the document claim compliance and helps with some aspects thereof but does not provide a guarantee of compliance. Secondly, there are two forms of metadata in a PDF document, the (old) docinfo dictionary that you are setting with pdfinfo, and the newer XMP metadata. Please read the documentation of the pdfx package to see how to use a docname.xmpdata file to specify XMP metadata. – Eric Marsden Jan 08 '20 at 22:08
  • Thanks for the comment. I have verified that the document is compliant. So no issues there. I have edited my question to include some more info. – Shinobii Jan 08 '20 at 22:15
  • the xmpdata-method works fine for me, ensure that you don't have an existing xmpdata file with wrong content. If the problem persists show the log-file. – Ulrike Fischer Jan 08 '20 at 22:27
  • Hmm, seems that I am unable to remove the old .xmpdata from Overleaf. Perhaps this is causing me the grief. I'll investigate this. – Shinobii Jan 08 '20 at 22:37
  • Try \usepackage{filecontents}, this will enable overwriting, and better use \jobname.xmpdata - overleaf changes the file name for the compilation. – Ulrike Fischer Jan 08 '20 at 22:40
  • Done and done. Thanks, all good now. – Shinobii Jan 08 '20 at 22:51

1 Answers1

3

I discurage using /pdfinfo directly. This writes metadata in the documentinfo dictionary which is a deprecated pdf feature today. The better way is to store metadata is as XMP. See generate PDF/A-1b answer how to do this.

With Metadata as XMP you can generate author lists. pdfauthor={author1,author2} generates

      <dc:creator>
        <rdf:Seq>
          <rdf:li>author1</rdf:li>
          <rdf:li>author2</rdf:li>
        </rdf:Seq>
      </dc:creator>

This will result in better accessibility to search engines.

I discourage using package pdfx which could do the same. But pdfx has disadvantages as you have already found out. It may include an outdated .xmpdata file.

tanGIS
  • 1,645
  • 15
  • 32