1

According to pages 28-29 of the documentation for the newtx package, version 1.704 (January 9, 2022), the following source includes the "elements [needed] to specify to generate a pdf satisfying the PDF/A-1b standards, as verified by Adobe Acrobat Pro."

With loading of the pdfx and hyperxmp packages along with the pdfa options in \hypersetup:

  • Adobe Acrobat Pro's File > Properties > Custom shows PDF/A-1b; but
  • Adobe Acrobat Pro's File > Properties > Description shows values only for the metadata items Title and Subject but not for Author or Keywords.

On the other hand, if I comment out loading pdfx, then:

  • Acrobat Pro's File > Properties > Custom no longer shows PDF/A-1b; and now
  • Acrobat Pro's File > Properties > Description also shows values for Author and Keywords metadata.

I'm using Adobe Acrobat Pro version 2021.011.20039, pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2022/dev), LaTeX2e <2021-11-15> patch level 1 with L3 programming layer <2022-01-21>.

Question: How can I get all the indicated metadata properties included in the pdf and, at the same time, have it verified by Acrobat Pro as PDF/A-1b compliant?

% !TEX TS-program = pdflatex
\begin{filecontents*}{\jobname.xmpdata}
  \Title{A Book}
  \Author{A. Nonymous}
  \Language{en}
  \Subject{A General Introduction to Things}
  \Keywords{things\sep stuff}
  \Publisher{My Self, Inc.}
  \Copyright{Creative Commons by-nc-nd}
\end{filecontents*}

\documentclass{article}

% To examine pdf as pure ASCII:
\pdfcompresslevel=0
\pdfobjcompresslevel=0
\input glyphtounicode
\usepackage{pdfx} % v 1.6.4 or higher
\InputIfFileExists{glyphtounicode-cmr.tex}{}{}
\InputIfFileExists{glyphtounicode-ntx.tex}{}{}
\usepackage[T2A,T1]{fontenc} 
\usepackage{substitutefont} % to allow non-default Cyrillic
\usepackage[russian,ngerman,polish,english]{babel}
\babeltags{russian=russian,french=french,german=ngerman,polish=polish}%
\substitutefont{T2A}{\rmdefault}{Tempora-TLF} % for Cyrillic
\usepackage[type1,sfdefault,scale=1]{sourcesanspro}% used by \mathsf
\usepackage[nohelv,amsthm,largesc,trueslanted,vvarbb,smallerops]{newtx}
\usepackage[varqu,varl]{inconsolata} % typewriter  

\usepackage{hyperxmp}
\RequirePackage[type={CC},modifier={by-nc-nd},version={4.0},lang={english}]{doclicense}
\usepackage{datetime2} % to satisfy the "\today" in \hypersetup
\DTMusemodule{english}{en-US}

\usepackage{hyperref}
\hypersetup{
  pdfapart=2, pdfaconformance=u,
  bookmarksnumbered,
  pdftitle={A Book},
  pdfauthor={A. Nonymous},
  pdfcreator={somebody},
  pdfpublisher={My Self, Inc.},
  pdfsubject={A General Introduction to Things},
  pdfkeywords={things, stuff},
  pdfdate={\today},
  pdflang={en},pdfmetalang={en},
  pdflicenseurl={http://creativecommons.org/licenses/by-nc-nd/4.0/}
}

\pdfgentounicode=1
\pdfglyphtounicode{EM}{0058 0058 0058 0058 0058 0058 0058 0058}%
\pdfglyphtounicode{NUL}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{uni222B.dsp}{222B}%
\pdfglyphtounicode{summationdisplay.1}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{summationdisplay}{0060 0060 0060 0060 0060 0060 0060 0060}%    
\pdfglyphtounicode{radicalBigg}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{radicalbig}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{radicalbigg}{0060 0060 0060 0060 0060 0060 0060 0060}%
\immediate\pdfobj stream attr{/N 3} file{sRGB.icc}
\pdfcatalog{%
    /OutputIntents [
     <<
         /Type /OutputIntent
         /S /GTS_PDFA1
         /DestOutputProfile \the\pdflastobj\space 0 R
         /OutputConditionIdentifier (sRGB)
         /Info (sRGB)
      >>
  ]
}

\usepackage{blindtext}

\begin{document}

To be finished!

\blindmathpaper

\end{document}
3
  • hyperxmp and pdfx are incompatible. You will have to choose one of them. Commented Feb 1, 2022 at 23:03
  • @UlrikeFischer: Then how do I obtain the author, title, etc., metadata in the pdf and, at the same time, get recognition of PDF/A-1b compliance?
    – murray
    Commented Feb 1, 2022 at 23:06
  • 1
    well the first question is why do you set pdfapart=2, pdfaconformance=u, if you want a-1b? Commented Feb 1, 2022 at 23:17

1 Answer 1

5

The following code (updated 2023-10) pass the preflight test for pdf/A-1b. It requires a current latex/tex system (so e.g an up-to-date texlive 2023)

\DocumentMetadata{pdfstandard=a-1b}
\documentclass{article}

\usepackage[T2A,T1]{fontenc}
\usepackage[russian,ngerman,polish,english]{babel}
\babeltags{russian=russian,french=french,german=ngerman,polish=polish}%
\DeclareFontFamilySubstitution{T2A}{\rmdefault}{Tempora-TLF} % for Cyrillic
\usepackage[type1,sfdefault,scale=1]{sourcesanspro}% used by \mathsf
\usepackage[nohelv,amsthm,largesc,trueslanted,vvarbb,smallerops]{newtx}
\usepackage[varqu,varl]{inconsolata} % typewriter

\RequirePackage[type={CC},modifier={by-nc-nd},version={4.0},lang={english}]{doclicense}
\usepackage{datetime2} % to satisfy the "\today" in \hypersetup
\DTMusemodule{english}{en-US}

\usepackage{hyperref}
\hypersetup{
  bookmarksnumbered,
  pdftitle={A Book},
  pdfauthor={A. Nonymous},
  %pdfcreator={somebody},
  pdfproducer=pdfTeX-1.40.23, %why needed ????????????
  pdfpublisher={My Self, Inc.},
  pdfsubject={A General Introduction to Things},
  pdfkeywords={things, stuff},
  pdfdate={\today},
  pdflang={en},pdfmetalang={en},
  pdflicenseurl={http://creativecommons.org/licenses/by-nc-nd/4.0/}
}


\pdfglyphtounicode{EM}{0058 0058 0058 0058 0058 0058 0058 0058}%
\pdfglyphtounicode{NUL}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{uni222B.dsp}{222B}%
\pdfglyphtounicode{summationdisplay.1}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{summationdisplay}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{radicalBigg}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{radicalbig}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{radicalbigg}{0060 0060 0060 0060 0060 0060 0060 0060}%

\usepackage{blindtext}

\begin{document}

To be finished!

\blindmathpaper

\end{document}

I don't know why setting the pdfproducer is needed, but it is too late now to check.

5
  • Adobe Acrobat Pro is merely still saying "This file claims compliance with the PDF/A standard...." But in File > Properties > Custom it is not showing PDF/A-1b compliance. Also, in Acrobat's PDF Standards > Preflight, when I selected to Verify compliance with PDF/A-1b, I get two errors: "XMP property does not match definitions of the extension schema" and "XMP property is predefined but is not used in accordance with the definition".
    – murray
    Commented Feb 2, 2022 at 1:55
  • On the other hand, if I change to \DocumentMetadata{uncompress,pdfstandard=a-2u}, then the pdf does successfully validate by Acrobat Pro. Which is surprising, since I thought PDF/A-2u subsumed PDF/A-1b.
    – murray
    Commented Feb 2, 2022 at 2:03
  • My example passed preflight, but I removed the conflicting pdfapart setting. Commented Feb 2, 2022 at 7:29
  • today I cannot reproduce the wayward behavior with PDF/A-1b that your code exhibited to me yesterday!
    – murray
    Commented Feb 2, 2022 at 16:04
  • Just FYI: When a document "claims" PDF/A (or PDF/X) conformance, it means exactly that: only a claim. The metadata has lines with that claim. But it does not imply that the PDF actually conforms. Anything that acually conforms, must make the claim; but making the claim does not imply conformance.
    – user287367
    Commented Oct 13, 2023 at 21:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .