Cell Padding does not work

Hi!

I am having problem in padding extra space around cell. I am calling a function which to create the cell. Everything works perfectly except I am getting no padding.

Mustansir

here is my function

private static void CellDefinition(Row rowTbl, TextInfo txtInfo, BorderInfo border, MarginInfo margin, string theText)

{

Cell cel = rowTbl.Cells.Add(theText, txtInfo);

cel.Border = border;

cel.VerticalAlignment = VerticalAlignmentType.Center;

MarginInfo mi = new MarginInfo();

mi.Top = 20;

mi.Bottom = 20;

mi.Right = 20;

mi.Left = 20;

cel.Padding = margin;

}

Hi,

Which component you are using? Are you using Excel Automation for your task?

Thank you.

Oh no, I am using Aspose.PDF. Sorry I forgot to mention that.

When I used DefaultCellPadding, it worked. But for individually defining the padding of each cell is not working.

I am declaring the ColumnsWidths property in % format rather than setting the pixels. Can this be bacause of that?

Hi,

Thanks for considering Aspose.

Please post your query @ (Aspose.Pdf Forum): https://forum.aspose.com/c/pdf

Thank you.