Articles in this section
Category / Section

How do I create borderless table?

1 min read

 

We can create a 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 a border.

C#

// Creating a border with a transparent color

PdfPen borderPen = new PdfPen(Color.Transparent);

borderPen.Width = 1.0f;

// Assigning the border pen to the table cell

PdfCellStyle defStyle = new PdfCellStyle();

defStyle.Font = font;

defStyle.BorderPen = borderPen;

table.Style.DefaultStyle = defStyle;

VB

' Creating a border with a transparent color

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

borderPen.Width = 1.0f

' Assigning the border pen to the 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 location specified below:

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  to leave a comment
Access denied
Access denied