3

I'm having the following data file called data.txt:

Testdata

and the following LaTeX code called test2.tex:

\documentclass{article}

\usepackage[a-3u]{pdfx}
\usepackage{embedfile}
\newcommand{\datafile}[2]{\embedfile[filespec={#2},ucfilespec={#2},filesystem=URL,mimetype=application/octet-stream,desc={#2},stringmethod=escape]{#1#2}}

\datafile{}{data.txt}

\begin{document}
Bla bla ...
\end{document}

Using pdfLaTeX I can generate a PDF which claims that it is PDF/A-3u.

If I verify this PDF with Adobe Preflight I get the following errors:

  • Embedded file does not have /AF entry
  • Embedded file has no /AFRelationship entry

enter image description here

If I use veraPDF V1.10.6 to verify the PDF I get the following errors:

enter image description here

How can I solve those problems?

I've seen that others have similar problems, see PDF/A-3b with attachments: how to create an /AF entry at pdf catalog?

Update

I found the following source describing the /AF entry and the /AFRelationship entry, see https://arxiv.org/pdf/1406.6126.pdf. I do not fully understand it.

If I take a look at the uncompressed pdf file, where the embed file is described, it looks like that:

5 0 obj
<</Type/Filespec/FS/URL/F(data.txt)/UF(data.txt)/Desc(data.txt)/EF<</F 4 0 R>>>>
endobj

If this would be changed to

5 0 obj
<</Type/Filespec/FS/URL/F(data.txt)/UF(data.txt)/Desc(data.txt)/AFRelationship/Unspecified/EF<</F 4 0 R>>>>
endobj

then there should be no missing /AFRelationship entry anymore.

And somewhere there should be /AF[5 0 R 5 0 R] to solve the missing /AF entry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.