iText7 508 Table Summary

拈花ヽ惹草 提交于 2019-12-06 08:32:56
rossfrank

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

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