- Home
- Forum
- Xamarin.Forms
- How to insert special characters to a pfdgrid?
How to insert special characters to a pfdgrid?
Hi,
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?
Thanks
SIGN IN To post a reply.
5 Replies
DB
Dilli Babu Nandha Gopal
Syncfusion Team
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.
Regards,
Dilli babu
RK
Reihaneh Khaksaran
December 18, 2018 04:29 PM UTC
Hi,
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!!
KC
Karthikeyan Chandrasekar
Syncfusion Team
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.
Regards,
Karthikeyan
RK
Reihaneh Khaksaran
December 22, 2018 03:44 PM UTC
Hi,
I set the build action to "Embedded Resources", but I still get the same exception!
KK
Karthik Krishnaraj
Syncfusion Team
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"); |
|
MainPage |
Name of the current Class |
|
UnicodeText |
It’s the project name |
|
Assets |
Asset folder inside the project UnicodeText |
|
Arial.ttf |
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.
Regards,
Karthik.
SIGN IN To post a reply.
- 5 Replies
- 4 Participants
-
RK Reihaneh Khaksaran
- Dec 1, 2018 02:37 PM UTC
- Dec 24, 2018 01:02 PM UTC