pdfpdf-generationwcag

Issue with PDF with accessibility - "Text object not tagged" error


I'm creating a pdf file and I'm encountering issues while checking the accessibility. I'm using the excellent PAC (PDF Accessibility Checker) for validation and I'm getting the error "Text object not tagged". PAC error message
I'm using pdfxplorer to view the pdf file structure and the content seems fine to me. The MCID seems to be set correctly in the content and also the struct elements are referencing the MCID. But obviously I'm missing something.

I have uploaded a small file showcasing the error here: https://drive.google.com/file/d/1ycowIH48nEDqL7_LzVew7TKIOLXoEuXb/view?usp=drive_link

Can someone have a look at the internals of the pdf and tell me what's wrong with it?
If you can also recommend a tool to better debug pdf issues that would be neat!
Thank you


Solution

  • Your MCIDs in the content stream are 1 and 2. But your array in the /StructParents has only two entries - which are implicitly for MCID 0 and MCID 1: /Nums [ 12 [ 7 0 R 8 0 R ]]. Change <</MCID 1>> to <</MCID 0>> and <</MCID 2>> to <</MCID 1>> in your content stream and your file passes.

    I checked this with VeraPDF, not PAC2024, since that's what I had to hand. But generally it's best to use both - you get different error messages and having both can help.