Forum How do I...?

Issues with tagged content nested inside display:inline-block;


I'm generating my PDF's using princexml v12.5 and are having some trouble with warnings from PAC, PAVE and Adobe acrobat.

It's a multi-column PDF using the css property display:inline-block; and basic bootstrap css to split everything.

Whenever i generate the PDFs and test them using PAC, PAVE and Adobe acrobat i'm getting theese warnings: innapropiate use of art structure, tables missing header and an image with link.

If i take the components and test them as stand-alone components without the css property display:inline-block; it works without any warnings.

Image with a link wrapped around is correctly structured in html and its all passed through

However when i run the image component through PAVE its giving me this error "Structure element is incorrectly nested: Figure in Link"

Do you have any solutions on how to set up an image component using HTML to avoid this warning?

How do we fix the <table> missing header when its nested inside display:inline-block;?

Why does Prince add unnecessary tags to pdfs when its nested inside display:inline-block:?
  1. no-css-html.html5.7 kB
  2. no-css-pdf.pdf84.7 kB
  3. with-css-html.html13.3 kB
  4. with-css-pdf.html13.3 kB
Can you please try this with Prince 14 or the latest build?
(1) The structure generated for a image inside a link is Link > Figure. I'm inclined to say that PAVE is not correct in warning about this nesting.

(2) The table missing header warning is due to the class on the <th> and <td> elements, which overrides the default 'display:table-cell' with
.col-xs-6 { display: inline-block }

This turns those elements into non-table cells, which are then wrapped together into a single table cell.

(3) The <caption> element seems to be responsible for an empty row in the Table. I will need to investigate what causes that.

Why does Prince add unnecessary tags to pdfs when its nested inside display:inline-block:?

Can you be more specific about this? There is room for improvement in the structure tree, but I'm not sure what you are referring to.
Hello, thanks for replying so fast and i do apologize for the late reply on my end!

@Mikeday - We are having the same issues with Prince v14.

1) It might be wrong by PAVE but we cannot see that the image is being tagged on Adobe Acrobat Pro ether. Report is attached as "Adobe Acrobat report".

2) This makes sense, thank you!

3) Thanks for checking this.

4) <span> is added as tags automatically when display:inline-block; is being added in the css. added the attachements "span-added-with-css" and "no-span-no-css". These are the same files 1 with CSS and 1 without.
  1. adobe--acrobat-report.html8.0 kB
  2. no-span-no-css.png245.8 kB
  3. span-added-with-css.png132.4 kB
(1) The image appears as marked content under a Figure structure element, as seen in your screen shots.

(4) We should be able to avoid generating those unnecessary Span elements in future updates. However, they should not harm accessibility.
We have now released an updated latest build of Prince which avoids generating some unnecessary Span elements in the tagged PDF structure tree.