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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:





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

Syncfusion Version:

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 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


Please let us know if you have any questions.



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

or the page will be automatically redirected to 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