The attachfile2 package (and also the attachfile package) has some issues with the tagging code. Example:
\DocumentMetadata
{
lang=en-US,
pdfversion=2.0,
pdfstandard=ua-2,
testphase={phase-III,title,math,table,firstaid}
}
\documentclass{article}
\usepackage{attachfile2}
\usepackage{xcolor}
\title{attachfile2 tagging test}
\attachfilesetup{color=blue}
\begin{document}
\attachfile{example-image.pdf} % compare with below
% text\attachfile{example-image.pdf}
\noattachfile
\textattachfile{example-image-a.pdf}{This text links to a file}
\notextattachfile{This text does not link to a file}
\end{document}
With lualatex it does not error but \attachfile gives parent-child warnings. These go away if it is preceded by something like text. Here's the structure tree with this fix.
The "This text links to a file" disappears. I'm not sure how content representing an annotation is supposed to be tagged.
Avoiding the error is rather easy, but proper tagging support would need a generic driver, so that one can add the OBJR-objects needed for an Annot structure.
The attachfile2 package (and also the attachfile package) has some issues with the tagging code. Example:
With pdflatex it errors with
With lualatex it does not error but
\attachfile
gives parent-child warnings. These go away if it is preceded by something liketext
. Here's the structure tree with this fix.The "This text links to a file" disappears. I'm not sure how content representing an annotation is supposed to be tagged.