We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Word Wrap in PDF Grid

Hello,

Is there a way to have columns and rows automatically wrap text? It is getting cut off.

Thanks

3 Replies

SL Sowmiya Loganathan Syncfusion Team August 26, 2019 09:43 AM UTC

Hi Matthew, 

Thank you for contacting Syncfusion support.  

We can automatically wrap the text in PDF grid cell by using PdfStirngFormat. Please find the below code snippet for more details, 

//Create a new instance for string format 
PdfStringFormat format = new PdfStringFormat(); 
format.WordWrap = PdfWordWrapType.Word; 
//Assign string format to cell style 
cell.Style.StringFormat = format; 

Please refer the below KB link in which we have explained step by step procedure to apply word wrap in PDF table cell, 

Kindly try the above solution in your end and let us know if it satisfies your requirement.  

Regards, 
Sowmiya L 



MH Matthew Hamlin August 26, 2019 02:22 PM UTC

Hello,

That worked. The issue I am having now is the height of the row is not automatic. The text is wrapped but it goes below the visible part of the cell. I have manually set the height but there is still some text that is so long that it does not fit. Any ideas?

Thanks


SL Sowmiya Loganathan Syncfusion Team August 27, 2019 11:35 AM UTC

Hi Matthew, 

We have tried to insert the long text in PDF grid cell with the previously provided KB link sample and the height of the row is set automatic. Please find the below screenshot for more details, 

Screenshot: 
 

Please find the sample for the same from below link, 

Please try the above sample in your end and let us know if it solves the issue.  
 
Regards, 
Sowmiya L 


Loader.
Live Chat Icon For mobile
Up arrow icon