How to apply word wrap in PDF Grid cell?
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
Note:
Starting with v16.2.0.x, if you reference Syncfusion® assemblies from a trial setup or from the NuGet feed, include a license key in your projects. Refer to the link to learn about generating and registering the Syncfusion® license key in your application to use the components without a trial message.
Conclusion
I hope you enjoyed learning about How to to apply word wrap in PDF Grid cell.
You can refer to our PDF feature tour page to know about its other groundbreaking feature representations. You can also explore our documentation to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums or feedback portal. We are always happy to assist you!