Multiple styles in one table cell

Hello,

I'm exporting a PDF from my web application. To populate the table cell i'm using following statement:

grid.Cells[0].Value = "Hello world";

How can I write formatted strings, where "Hello" is in black font 12px and world is in gray font 10px?

Thanks!


1 Reply

GK Gowthamraj Kumar Syncfusion Team November 16, 2021 12:40 PM UTC

Hi Roel, 

Thank you for contacting Syncfusion support. 

No. We do not have direct support for applying multiple font style in a particular grid cell using our PDF library. As a workaround, we can apply the Html text with multiple styles using PdfHtmlTextElement to particular grid cell. We have created a sample to add a Html text with multiple styles (black and grey color with font size) in a particular grid cell. Attached the sample and output document for your reference. Please try the sample on your end and let us know if it suites your requirement or not. 


Please refer the below links for more information,   

Please let us know if you need any further assistance on this. 

Regards, 
Gowthamraj K 


Loader.
Up arrow icon