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

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

Thread ID:

Created:

Updated:

Platform:

Replies:

123688 Apr 11,2016 12:34 PM Apr 12,2016 08:28 AM Windows Phone 1
loading
Tags: PDF
Mark Riley
Asked On April 11, 2016 12:34 PM

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?


Chinnu Muniyappan [Syncfusion]
Replied On April 12, 2016 08:28 AM

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


CONFIRMATION

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.

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.

;