Articles in this section
Category / Section

How do I create borderless table?

1 min read

 

We can create borderless table with the help of the Style property of the PdfLightTable class. By assigning the border color as Transparent we can draw the table without border.

C#

// Creating Border with transparent color

PdfPen borderPen = new PdfPen(Color.Transparent);

borderPen.Width = 1.0f;

// Assigning the border pen to table cell

PdfCellStyle defStyle = new PdfCellStyle();

defStyle.Font = font;

defStyle.BorderPen = borderPen;

table.Style.DefaultStyle = defStyle;

VB

' Creating Border with transparent color

Dim borderPen As PdfPen = New PdfPen(Color.Transparent)

borderPen.Width = 1.0f

' Assigning the border pen to table cell

Dim defStyle As PdfCellStyle = New PdfCellStyle()

defStyle.Font = font

defStyle.BorderPen = borderPen

table.Style.DefaultStyle = defStyle

Please look into the sample from the below specified location,

http://www.syncfusion.com/support/user/uploads/BorderLessTableSample_e7bfb032.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied