# How to fix ISO 19005-1 clause 6.1.9 check fail in veraPDF when generating PDF/A?

I am attempting to create a PDF/A document using LaTeX, pdfTeX. I need to conform to my university's profile, checked by veraPDF. In my .tex file before \begin{document} I use the package pdfx to generate a PDF/A document compliant to the norm 2u: \usepackage[a-2u]{pdfx}.

Additionally, I use ghostscript to ensure that ISO 19005-2:2011 clause 6.2.4.3 is not violated (related to use of DeviceCMYK):

gs -dPDFA -dBATCH -dNOPAUSE -sProcessColorModel=DeviceRGB -sDEVICE=pdfwrite -sPDFACompatibilityPolicy=1 -sOutputFile=OUTPUT.pdf INPUT.pdf


Unfortunately, veraPDF tells me that ISO 19005-1 clause 6.1.9 check failed, with the description

The object number and generation number shall be separated by a single white-space character. The generation number and obj keyword shall be separated by a single white-space character. The object number and endobj keyword shall each be preceded by an EOL marker. The obj and endobj keywords shall each be followed by an EOL marker.

Unfortunately, I don't know what this means and what I should change to make the document compliant. (I'm a LaTeX newbie.) Could anybody help me out please? Thanks a lot!

• It looks as if ghostscript sometimes removes the newline char between the end of a dictionary and the endobj keyword. In a small example I found two occurances after running your gs command. This is clearly a ghostscript problem and nothing on the pdftex side imho can be done here. Try to find another solution for whyever you started to use it in the first place. – Ulrike Fischer Jun 1 '20 at 14:04

Do not use ghostscript. This software is from the pre-PDF area. All conversions are lossy and should be avoided. Create a PDF directly with pdfTeX, LuaLaTeX or LuaHBTeX (or maybe XeTeX). I recommend not using pdfx since it behaves strangely. Try hyperxmp instead for including all the necessary metadata. For minimal working examples see here. Include such an example in your question if you desire more precise answers.