iText7 508 Table Summary

2019-05-26 13:18发布

We are creating a large table using iText 7 we are almost fully 508 complaint however we are missing the table summary rule.

Is there a way to add the table summary at creation time using iText 7?

Accessibility Summary

Tab Oder without Table Summary

I have attached a picture of what I am looking for. Tab Order with Table Sumamry

2条回答
劳资没心,怎么记你
2楼-- · 2019-05-26 13:53

It is possible to add AccessibilityProperties to the Table object itself. The Summary needs to be added through a PdfDictionary

PdfDictionary attr = new PdfDictionary();
attr.put(new PdfName("Summary"), new PdfString("Info about the table"));
table.getAccessibilityProperties().addAttributes(new PdfStructureAttributes(attr));

ApiDocs can be found here

查看更多
时光不老,我们不散
3楼-- · 2019-05-26 14:07

I tried the solution above, but unfortunately Adobe's Summary Accessebility Check failed.

According to the specification, the acceesibility properties' structure should be a bit different. One should use the next line:

tblContact.getAccessibilityProperties().addAttributes(new PdfStructureAttributes("Table").addTextAttribute("Summary","Table summary text" ));
查看更多
登录 后发表回答