Hi,
I set the Margin as below,
margin.setTop(0f);
table.setDefaultCellPadding(margin);
But the cell padding in PDF is also not effected.
And another question, the method cell.setRowSpan is not work property.
Thanks.
rayychoi:Hi,
I set the Margin as below,
margin.setTop(0f);
table.setDefaultCellPadding(margin);
But the cell padding in PDF is also not effected.
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");
aspose.pdf.MarginInfo margin = new aspose.pdf.MarginInfo();
margin.setTop(15);
table1.setDefaultCellPadding(margin);
aspose.pdf.Row row1 = table1.getRows().add();
aspose.pdf.Cell cell1Row1 = row1.getCells().add("ColumnsSpan = 2");
cell1Row1.setColumnsSpan(2);
cell1Row1.setBorder(new aspose.pdf.BorderInfo(aspose.pdf.BorderSide.All.getValue(), 0.5F));
aspose.pdf.Row row2 = table1.getRows().add();
aspose.pdf.Cell cell1Row2 = row2.getCells().add("cell1");
cell1Row2.setBorder(new aspose.pdf.BorderInfo(aspose.pdf.BorderSide.All.getValue(), 0.5F));
aspose.pdf.Cell cell2Row2 = row2.getCells().add("cell2");
cell2Row2.setBorder(new aspose.pdf.BorderInfo(aspose.pdf.BorderSide.All.getValue(), 0.5F, new aspose.pdf.Color("Red")));
pdf1.save(“c:/pdftest/setDefaultCellPadding_Test.pdf”);
rayychoi:the method cell.setRowSpan is not work property.