我的应用程序是用两种不同版本的英语和阿拉伯语开发 我在iText中使用rowspan和colspan创建了pdf表,它在英文版中完美运行,但在阿拉伯语版本中,rowspan不起作用.当我使用setRunDirection(3)将阿拉伯语文本放入我的表时,setRowspan(2)无效.
请告诉我如何在这里设置rowspan值.
请帮我解决这个问题.
谢谢
这是表大小2列和rowspan 2的代码的一部分.
BaseFont base=BaseFont.createFont("C:/Windows/Font/arial.ttf",BaseFont.IDENTITY_H,BaseFont.EMBEDDED);
Font sourceFont= new Font(base, 9,Font.NORMAL,Color.RED);
PdfPTable tab1=new PdfPTable(2);
tab1.setRunDirection(3);//**(if you comment this line it will work)**
PdfPCell cells;
cells=new PdfPCell(new Paragraph("arabic text", sourceFont));
cells.setRowspan(2);
tab1.addCell(cells);
cells=new PdfPCell(new Paragraph("arabic text", sourceFont));
tab1.addCell(cells);
cells=new PdfPCell(new Paragraph("arabic text", sourceFont));
tab1.addCell(cells);
Run Code Online (Sandbox Code Playgroud) itext ×1