Hi,
I want to reduce the border width of the grid present on the following image.
I used PDF grid to generate this.
Please let me know how to achieve that.
//Create the PDF document
PdfDocument doc = new PdfDocument();
//Add the first page
PdfPageBase page = doc.Pages.Add();
//Create grid
PdfGrid grid = new PdfGrid();
//Add a row
PdfGridRow row1 = grid.Rows.Add();
grid.Columns.Add(2);
//Set border size and color of cell1 to 1f and black.
PdfPen pdfpen1 = new PdfPen(Color.Black, 1f);
row1.Cells[0].Style.Borders.All = pdfpen1;
//Set border size and color of cell1 to 2f and red.
PdfPen pdfpen2 = new PdfPen(Color.Red, 2f);
row1.Cells[1].Style.Borders.All = pdfpen2;
//Fill data
string str = "Hello Word!";
for (int i = 0; i < grid.Columns.Count; i++)
{
row1.Cells[i].Value = str;
}
//Draw the grid on page
grid.Draw(page, new PointF(0, 50));
//Save pdf file
string result = @"../../output/PDFNoneBorderGrid.pdf";
doc.SaveToFile(result, FileFormat.PDF);