We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Table left border alignment

I am creating a pdf file having two tables. I am not doing any aligning myself.

The left side of the table that is being generated is not properly aligned. I am attaching the code sample, and the generated pdf file.

Please guid how can I achieve a proper alignment of rows and borders.

Hi sanjay.kumar.jha,

To set the alignment for row, define the DefaultCellTextInfo of the row. For setting the alignment to center, use row1.DefaultCellTextInfo.Alignment = Aspose.Pdf.Generator.AlignmentType.Center;

And to set the border for table, use the code line given below

tab1.DefaultCellBorder = new Aspose.Pdf.Generator.BorderInfo((int) Aspose.Pdf.Generator.BorderSide.All, 0.1F);