Unsupported encoding error when using a custom font while creating a PDF

Syncfusion Version: 13.3.0.7

Assembly: Syncfusion.Pdf.WP

When attempting to use a custom font in a PDF in a Windows Phone 8.1 (WinRT) application using code like the following:

    fileStream = assembly.GetManifestResourceStream("Namespace.Assets.verdana.ttf");

    PdfTrueTypeFont font = new PdfTrueTypeFont(fileStream, 25, PdfFontStyle.Regular);

you get an exception like this in the simulator:

    'windows-1252' is not a supported encoding name. Parameter name: name

       at System.Globalization.EncodingTable.internalGetCodePageFromName(String name)

       at System.Globalization.EncodingTable.GetCodePageFromName(String name)

       at System.Text.Encoding.GetEncoding(String name)

       at Syncfusion.Pdf.Graphics.TtfReader..cctor()

I notice that in your sample pdf code, you have commented out some code which uses a custom font. If you uncomment this code, then you get the same error.

Is there a way round this?


1 Reply

CM Chinnu Muniyappan Syncfusion Team April 12, 2016 12:28 PM UTC

Hi Mark,

We were able to reproduce the problem and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents 


Please let us know if you have any questions.


Regards,
Chinnu


Loader.
Up arrow icon