Table borders in pdf


Dear Support,

We are trying to use your commands and not having the desired results.
The code is not displaying the top and left border as it should. The word TOTAL is also corrupted by a minus sign.

See code and output below.
Please advise prompt because we are very keen to purchase licences as soon as this issue is resolved.

Dim table6 As Aspose.Pdf.Table = New Aspose.Pdf.Table
table6.DefaultCellTextInfo.FontName = "Arial"
table6.DefaultCellTextInfo.FontSize = 11
table6.ColumnWidths = "3cm"
Dim t6r1 As Row = table6.Rows.Add()
Dim t6c1r1 As Cell = t6r1.Cells.Add(“Labour:” & vbCr & “Parts:” & vbCr & “Freight:” & vbCr & “TOTAL:” & vbCr & “GST:”)
t6c1r1.Border = New BorderInfo(CType(BorderSide.Top, Integer), 0.5)
t6c1r1.Border = New BorderInfo(CType(BorderSide.Left, Integer), 0.5, New Aspose.Pdf.Color(“Red”))
t6c1r1.Border = New BorderInfo(CType(BorderSide.Bottom, Integer), 2)

ps:Output cannot be pasted.


Dear chewban,

thanks for your consideration.

Please view BorderInfo Constructor in API refence. You should set border sides like this: (int)(BorderSide.Left | BorderSide.Top).


How can I set the right/left/bottom border to 1.0F AND the top border to 2.0F in one line?

Currently I do THIS which only sets the TOP border to 2.0F and the other borders are not set:

cell.Border = New BorderInfo(Fix(BorderSide.Bottom Or BorderSide.Left Or BorderSide.Right), 1.0F)
cell.Border = New BorderInfo(Fix(BorderSide.Top), 2.0F)




Dear Edward,

Thank you for considering Aspose.

When you use the “New BorderInfo” to create BorderInfo object for the second time, the former one is replaced. You should use the following code:

cell.Border = New BorderInfo(Fix(BorderSide.Bottom Or BorderSide.Left Or BorderSide.Right), 1.0F)
cell.Border.Top = New GraphInfo()
cell.Border.Top.LineWidth = 2.0F