From 962aed53a9f6147d788c9a6c7fa443d0a833a3cc Mon Sep 17 00:00:00 2001 From: Sameerkhan Date: Thu, 30 Jan 2025 09:50:01 +0530 Subject: [PATCH] 935299 Resolved the given feedback. --- .../.NET/Resize-font-to-fit-grid-cell-width/Program.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Table/PdfGrid/Resize-font-to-fit-grid-cell-width/.NET/Resize-font-to-fit-grid-cell-width/Program.cs b/Table/PdfGrid/Resize-font-to-fit-grid-cell-width/.NET/Resize-font-to-fit-grid-cell-width/Program.cs index 9928da2a..75b0146c 100644 --- a/Table/PdfGrid/Resize-font-to-fit-grid-cell-width/.NET/Resize-font-to-fit-grid-cell-width/Program.cs +++ b/Table/PdfGrid/Resize-font-to-fit-grid-cell-width/.NET/Resize-font-to-fit-grid-cell-width/Program.cs @@ -35,13 +35,13 @@ static void Main(string[] args) pdfGridHeader.Cells[2].Value = "Details"; // Add rows to the grid. - for (int i = 0; i < 5; i++) + for (int i = 1; i <= 5; i++) { PdfGridRow row = grid.Rows.Add(); row.Height = 20; row.Cells[0].Value = "E0" + i; - row.Cells[1].Value = "Syncfusion PDF library supports to adjust PDF table row width based on the text length"; - row.Cells[2].Value = "Syncfusion PDF library supports to adjust PDF table row width based on the text length by enabling the AllowHorizontalOverflow property in the PDF document using C# and VB.NET"; + row.Cells[1].Value = "Employee " + i; + row.Cells[2].Value = String.Format("Employee {0} is a software engineer with over ten years of experience in developing scalable applications. He specializes in full-stack development and enjoys working on innovative projects.", i); } // Adjust the font size to fit the cell content. @@ -84,7 +84,7 @@ public static void AdjustFontSize(PdfGrid grid) while (fontSize > 0) { - //Measure the text + // Measure the text. SizeF textSize = currentFont.MeasureString(text, cellSize.Width); if (textSize.Height <= cellSize.Height) {