Hi Support Team,
Hi Ankit,
Hi
Ankit777:This is happeing when I set table.setColumnAdjustment(ColumnAdjustmentType.AutofitToContent);if I do ittable.setColumnAdjustment(ColumnAdjustmentType.Customized);
Pdf pdf1 = new Pdf();<o:p></o:p>
Section sec1 = pdf1.getSections().add();
aspose.pdf.Table table1 = new aspose.pdf.Table();
sec1.getParagraphs().add(table1);
table1.setColumnWidths("70 2cm");
table1.setColumnAdjustment(ColumnAdjustmentType.Customized);
Row row1 = table1.getRows().add();
Cell cell1Row1 = row1.getCells().add("ColumnsSpan = 2");
cell1Row1.setColumnsSpan(2);
cell1Row1.setBorder(new BorderInfo(BorderSide.All.getValue(), 0.5F));
Row row2 = table1.getRows().add();
Cell cell1Row2 = row2.getCells().add("cell1");
cell1Row2.setBorder(new BorderInfo(BorderSide.All.getValue(), 0.5F));
Cell cell2Row2 = row2.getCells().add("cell2");
cell2Row2.setBorder(new BorderInfo(BorderSide.All.getValue(), 0.5F, new aspose.pdf.Color("Red")));
Section sec2 = pdf1.getSections().add();
aspose.pdf.Table table2 = new aspose.pdf.Table();
sec2.getParagraphs().add(table2);
table2.setColumnWidths("70 2cm");
table2.setColumnAdjustment(ColumnAdjustmentType.Customized);
Row row12 = table2.getRows().add();
Cell cell1Row12 = row12.getCells().add("ColumnsSpan = 2");
cell1Row12.setColumnsSpan(2);
cell1Row12.setBorder(new BorderInfo(BorderSide.All.getValue(), 0.5F));
Row row22 = table2.getRows().add();
Cell cell1Row22 = row22.getCells().add("cell1");
cell1Row22.setBorder(new BorderInfo(BorderSide.All.getValue(), 0.5F));
Cell cell2Row23 = row22.getCells().add("cell2");
cell2Row23.setBorder(new BorderInfo(BorderSide.All.getValue(), 0.5F, new aspose.pdf.Color("Red")));
pdf1.save(“c:/pdftest/Exception_Reproduce.pdf”);