Base-level PDF/A compliance for LaTeX files isn't as simple as they all say apparently. This copied-from-various-internet-sources hack file seems to fix it for me, with TeXLive 2023 on Arch Linux.
Attribution is provided in source code comments! Since all borrowed content is from StackExchange,
it is licensed CC-BY-SA (details).
This means that anything else added by me + the curation (= the entire pdfacompliance.tex
) also must carry that license.
The parts that are not related to the StackExchange code may be used freely as specified by
the Unlicense.
Place the file in your working directory and include it in your LaTeX document, as demonstrated in example.tex
.
Having the colour profile raw stuff floating around in your document seems werid, and I feel like there must be a better solution, but I wasn't able to find one.
This results in a PDF/A-2u compliant file, as verified by VeraPDF, which is a dedicated open source validation tool for PDF/A. It can be made compliant with any of the PDF/A-2* family by adjusting the conformance level it claims.
Note that if you use graphics, fonts, etc., the conformance may break ... so make sure to verify and re-verify with VeraPDF.