Category / Section
How to apply word wrap in PDF Grid cell?
1 min read
How to apply word wrap in PDF Grid cell?
The text can be wrapped in a PDF grid cell by using the StringFormat property in PdfGridCellStyle. Please find the code snippet and sample for the same.
C#:
PdfGridCellStyle headerStyle = new PdfGridCellStyle(); headerStyle.Font = subHeadingFont; headerStyle.BackgroundBrush = PdfBrushes.LightSteelBlue; headerStyle.TextBrush = PdfBrushes.DarkBlue; headerStyle.StringFormat=new PdfStringFormat(); // Wraps word headerStyle.StringFormat.WordWrap = PdfWordWrapType.Word;pdfGridHeader.ApplyStyle(headerStyle);
Sample Link:
http://www.syncfusion.com/downloads/support/directtrac/147065/ze/PdfGridWrap-524726209