- Home
- Forum
- ASP.NET MVC
- Is it possible to generate a PDF with Polish characterset in .NET Core
Is it possible to generate a PDF with Polish characterset in .NET Core
Hi,
I've been attempting to generate a PDF that contains polish characters.
I've been attempting to generate a PDF that contains polish characters.
I'm using a .net core 1.1 web app with Syncfusion.Pdf.AspNet.Core v 14.4600.0.20-preview2-final
I've tried various techniques that I've found from the forum / documentation but none of them work.
1.
var fontStream = File.OpenRead("PdfAssets/TheanoDidot-Regular.ttf");
var headingFont = new PdfTrueTypeFont(fontStream, 20);
Throws a NotSupportedException containing inner exception - No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
2.
PdfFont font = new PdfTrueTypeFont(new Font("Arial.ttf", 14));Seems to be from an older / different version to what I'm running - PdfTrueTypeFont constructor does not take 1 argument.
Any assistance would be greatly appreciated.
SIGN IN To post a reply.
1 Reply
CM
Chinnu Muniyappan
Syncfusion Team
February 8, 2017 12:17 PM UTC
Hi Julian,
Thank you for contacting Syncfusion support.
|
I've been attempting to generate a PDF that contains polish characters.
I'm using a .net core 1.1 web app with Syncfusion.Pdf.AspNet.Core v 14.4600.0.20-preview2-final
I've tried various techniques that I've found from the forum / documentation but none of them work.
1.
var fontStream = File.OpenRead("PdfAssets/TheanoDidot-Regular.ttf");
var headingFont = new PdfTrueTypeFont(fontStream, 20); Throws a NotSupportedException containing inner exception - No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
|
Yes, we have supported polish characters by using PdfTrueTypeFont in Asp.Net Core platform, however we are able to reproduce the problem with “Exception occurs while using PdfTrueTypeFont. 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
| |
|
2.
PdfFont font = new PdfTrueTypeFont(new Font("Arial.ttf", 14));
Seems to be from an older / different version to what I'm running - PdfTrueTypeFont constructor does not take 1 argument.
Any assistance would be greatly appreciated.
|
PdfTrueTypeFont does not support System.Drawing.Font as an overload in Asp.Net core platform, so we have suggested you to use the anther overload for the font stream as input in PdfTrueTypeFont, Please refer the below code snippet for more details.
|
Please let us know if you have any concern.
Regards,
Chinnu
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
JU Julian
- Feb 7, 2017 11:25 AM UTC
- Feb 8, 2017 12:17 PM UTC