Compilation error using `pdfmanagement` package with `pdfstandard=A-4`
Since the November change from using \DocumentMetadata to \RequirePackage{pdfmanagement} for pdf management without tagging support, documents which specify pdfstandard=A-4 don't compile with either lualatex or xelatex (don't have the packages installed to test pdflatex).
% \DocumentMetadata{% Compiles with this trivial document, but otherwise issues
\RequirePackage{pdfmanagement} % Using a KOMA-Script class (no current tagging support)
\SetKeys[document/metadata]{%
% pdfstandard=A-3u % Compiles, as do other standards < 4
pdfstandard=A-4 % Compilation error, also A-4e and A-4f
}
\documentclass{scrartcl}
\begin{document}
foo
\end{document}
ups. I will look at it.
It will compile if you set the pdfversion first (but naturally it shouldn't error like this ...):
\RequirePackage{pdfmanagement} % Using a KOMA-Script class (no current tagging support)
\SetKeys[document/metadata]{%
pdfversion=2.0,
pdfstandard=A-4,
}
\documentclass{article}
\begin{document}
foo
\end{document}
Thanks. Prior to the November release I always used to also set the pdfversion but read that from Version: 2025-08-22 v0.96w it is automatically set to the highest version for the specified pdfstandard, which is what I wanted, so omitted it and my testing showed that it was setting the correct version.
Yes, that was the intention. I had only forgotten that for A-4 there is no max version set.
it is automatically set to the highest version for the specified pdfstandard
I quote from the ltnews41 newsletter:
When
\DocumentMetadatais used, LaTeX will therefore, by default, set PDF 2.0 as the PDF version. A different PDF version can, if required, be set by explicit use of the pdfversion key.
@u-fischer Are you saying that the default setting isn’t always PDF 2.0, but depends on the pdfstandard parameter? If so, where is this behavior documented?
Are you saying that the default setting isn’t always PDF 2.0, but depends on the pdfstandard parameter? If so, where is this behavior documented?
It is the plan that it depends also on the pdfstandard, so if you request e.g. pdf/A-3 it goes back to PDF 1.7. But it isn't fully implemented yet, only the UA-standards currently force a version. The rest will come with the next LaTeX release. Some documentation is in l3pdfmeta at the description of min_pdf_version.
Ok, that’s sounds good.
@u-fischer If the user sets a PDF version that isn’t compliant with the PDF standard, it would be desirable for LaTeX not only to automatically adjust the PDF version, but also to inform the user with a message.