Why is my pdf file missing PDF/A-2 specific metadata?

When I create a PDF/A-2 using LaTeX and then look at it with pdfinfo I get

PDF version:     1.7
PDF subtype:    PDF/A-2b:2010
    Title:         ISO 19005 - Electronic document file format for long-term preservation (PDF/A)
    Abbreviation:  PDF/A-2
    Subtitle:      Part 2: Use of ISO 32000-1
    Standard:      ISO 19005-2
    Conformance:   Level B, Basic

When creating a PDF/A-2 document with typst 0.12 I only see

PDF version:     1.7

Hello @Manfred_Lotz!
EDIT: Nevermind, sorry for misreading your question, uurgh!

the PDF version and the PDF/A-2 standard conformance are two different things. In your output, it is written PDF subtype: PDF/A-2b:2010, which is what you were looking for.

You might also want to look at When will PDF/A export be available? - #14 by quachpas? to find a way to verify PDF/A-2b conformance.

Don’t hesitate to read How to post in the Questions category :slight_smile:!

Can you send the Latex PDF where it works? I can reproduce this for Typst, but when I create a manual Latex document with PDF/A2 it also doesn’t show up for me.

I can get PDF subtype using a MWE compiled with tectonic (xelatex)

\let\pdfcreationdate=\creationdate
% \pdfminorversion=7 % pdftex
% \pdfvariable minorversion % lua
\documentclass{article}
\special{pdf:minorversion 7} % xelatex
\usepackage[a-2b,mathxmp]{pdfx}
\begin{document}
The text of the document goes here.
\end{document}

Okay, I figured it out, XeTeX somehow adds a “/GTS_PDFA1Version (PDF/A-2b:2010)” attribute into the PDF. If I remove it, it also doesn’t show up in pdfinfo. However, from what I can tell, this is not a standard PDF attribute, so not sure why it’s there. In any case, in Adobe Acrobat it seem to show up fine when opening a Typst document with PDF/A2, so I wouldn’t worry about it too much. :)

It is in the ISO standard from what I understand, assigned by Adobe! See Wayback Machine

ISO TC130 requires that GTS_ keys and values used in the development of International or national PDF-based standards be registered with ANSI CGATS

Source: Add support for reading PDF/A, PDF/X version from the information dictionary (glib backend) (#363) · Issues · poppler / poppler · GitLab

I also used the pdfx package but compiled with pdflatex. So it seems that the pdfx package does something here.

Also this PDF/A-2, PDF for Long-term Preservation, Use of ISO 32000-1 (PDF 1.7) seems to indicate that a subtype should be there.

But most important is that the Typst created PDF is PDF/A-2b ok from a content point of view :grin:

Sorry, I should have been clearer. Typst does write the corresponding subtype in the output intent:

<<
    /Type /OutputIntent
    /S /GTS_PDFA1
    /OutputCondition (sRGB)
    /OutputConditionIdentifier (Custom)
    /Info (sRGB IEC61966-2.1)
    /DestOutputProfile 1 0 R
  >>

However, Xetex, in addition to adding it to the output intent, also adds it to the document information dictionary:

<<
  /CreationDate (D:20241022212126+00'00')
  /Creator (LaTeX with hyperref)
  /GTS_PDFA1Version (PDF/A-2b:2010)
  /ModDate (D:20241022212126+00'00')
  /Producer (XeTeX)
  /Trapped /False
>>

which doesn’t seem to be a standard entry in the document information dictionary, so I presume it’s a custom attribute:

But if they are really commonly used, I guess we should also add it.

2 Likes

Hi @Manfred_Lotz, welcome and thank you for your post, which I have moved to Questions! I have changed your post’s title from “Creating PDF/A-2 document” to “Why is my pdf file missing PDF/A-2 specific metadata?” as the question guidelines recommend this:

Good titles are questions you would ask your friend about Typst.

I also added the pdf tag, as it makes your question easier to find.

Finally, don’t forget to tick one of the responses if you got a satisfying answer. The answer you choose should usually be the response that you found most correct/helpful/comprehensive for the question you asked. Thanks!

When I created this post I saw too late that Questions would have been better.

Thanks @SillyFreak.