首页 > 解决方案 > 在 PAC 2.0 中,iTextSharp 表格单元格不会通过 ScreenReader 查看器换行

问题描述

我使用 iTextSharp 创建 PDF 文档。添加了表格。通过 PAC 2.0 检查 PDF 的可访问性。当我通过 PAC 工具的“ScreenReader Preview”选项阅读文档时,表格单元格没有被包装。PDF 文档按预期生成表格。在下面的代码中使用。

PdfPTable table = new PdfPTable(3);
table.TotalWidth = 500f;
table.LockedWidth = true;
float[] widths = new float[] { 20f, 60f, 60f};
table.SetWidths(widths);
PdfPCell cell = new PdfPCell(new Phrase("text 1", times));
   table.AddCell(cell);
cell = new PdfPCell(new Phrase("text 2", times));
   table.AddCell(cell);
cell = new PdfPCell(new Phrase("text 3", times));
   table.AddCell(cell);

我该如何解决这个问题?

谢谢

标签: c#itextaccessibilitypac

解决方案


推荐阅读