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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to insert special characters to a pfdgrid?

Thread ID:





141248 Dec 1,2018 02:37 PM UTC Dec 24,2018 01:02 PM UTC Xamarin.Forms 5
Tags: PDF
Reihaneh Khaksaran
Asked On December 1, 2018 02:37 PM UTC

I want to insert some characters like "■" or "Ω" as a value to one of my pdfGrid cells, like this:

            Row.Cells[1].Value = "■";

But after running the app the cell is empty, can you please help me with this issu?


Dilli Babu Nandha Gopal [Syncfusion]
Replied On December 3, 2018 10:06 AM UTC

Hi Reihaneh,  
Thank you for contacting Syncfusion support.  
Yes, it is possible to draw the special characters in PdfGrid by setting the PdfGrid font as PdfTrueTypeFont. Kindly refer the below KB to preserve Unicode text in PdfGrid.  
Kindly check the above KB and let us know, if you need further assistance in this.  

Dilli babu 

Reihaneh Khaksaran
Replied On December 18, 2018 04:29 PM UTC


Thank you so much for your reply, I followed the instructions in the given KB link, but I get null reference exception at this line of code:

Stream fontStream = typeof(MainPage).GetTypeInfo().Assembly.GetManifestResourceStream("UnicodeText.Assets.arial.ttf");
fontStream is always null!!

Karthikeyan Chandrasekar [Syncfusion]
Replied On December 19, 2018 08:53 AM UTC

Hi Reihaneh, 
Thank you for your update.  
We are suspecting the font file (arial.ttf) build action is not set as Embedded Resource. So, the font stream becomes null and the null reference exception throws when we try to accessing.  
Kindly check, step 7 from below KB to mark the font file as Embedded Resource.  
Please try our suggestion and let us know If you need further assistance in this.  

Reihaneh Khaksaran
Replied On December 22, 2018 03:44 PM UTC


I set the build action to "Embedded Resources", but I still get the same exception!

Karthik Krishnaraj [Syncfusion]
Replied On December 24, 2018 01:02 PM UTC

Hi Reihaneh,  
Thank you for your update.  
In generally the null returns from the GetManifestResourceStream, when the build action is not set as embedded resource to the font file or the file path is mismatched.  
For example:  
Stream fontStream = typeof(MainPage).GetTypeInfo().Assembly.GetManifestResourceStream("UnicodeText.Assets.arial.ttf");  
Name of the current Class  
It’s the project name  
Asset folder inside the project UnicodeText  
Arial.ttf font file inside the Assets folder  
Could you please ensure the mentioned above information same in your project? For your reference, we have already shared the KB link. In the KB link there is a runnable sample  project, kindly download and run the sample in your end. If still have an issue, kindly share the sample which you are facing, we will check and resolve the issue.  


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon