iText7 508 Table Summary

本秂侑毒 提交于 2019-12-08 02:39:44

问题


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?

I have attached a picture of what I am looking for.


回答1:


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




回答2:


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" ));


来源:https://stackoverflow.com/questions/51328362/itext7-508-table-summary

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!