You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am following the guide within the github repo but i keep getting an error about the font not containing a character. I have attached a few lines of code. This particular string is throwing the error even though it does not contain the full stop character.
PdfDocumentBuilder.AddedFont font = document.AddStandard14Font(Standard14Font.Helvetica);
var test = "This is a Standard Item Called Understanding of customer’s query";
page.AddText(test, 12, closeToTop, font);
System.InvalidOperationException HResult=0x80131509 Message=The font does not contain a character: ’. Source=UglyToad.PdfPig StackTrace: at UglyToad.PdfPig.Writer.PdfPageBuilder.DrawLetters(NameToken name, String text, IWritingFont font, TransformationMatrix fontMatrix, Decimal fontSize, TransformationMatrix textMatrix) at UglyToad.PdfPig.Writer.PdfPageBuilder.AddText(String text, Decimal fontSize, PdfPoint position, AddedFont font) etc (cant share more as it reveals clients)
The text was updated successfully, but these errors were encountered:
So it looks like you're passing the Microsoft curly apostrophe ’ instead of the "normal" ASCII apostrophe '. The standard 14 fonts only support a limited character set. You might need to use a TrueType font if you want access to the Word symbols like curly quotes and apostrophes. https://stackoverflow.com/questions/2826191/converting-ms-word-curly-quotes-and-apostrophes
PdfPig 0.1.6 Nuget Package.
I am following the guide within the github repo but i keep getting an error about the font not containing a character. I have attached a few lines of code. This particular string is throwing the error even though it does not contain the full stop character.
System.InvalidOperationException HResult=0x80131509 Message=The font does not contain a character: ’. Source=UglyToad.PdfPig StackTrace: at UglyToad.PdfPig.Writer.PdfPageBuilder.DrawLetters(NameToken name, String text, IWritingFont font, TransformationMatrix fontMatrix, Decimal fontSize, TransformationMatrix textMatrix) at UglyToad.PdfPig.Writer.PdfPageBuilder.AddText(String text, Decimal fontSize, PdfPoint position, AddedFont font) etc (cant share more as it reveals clients)
The text was updated successfully, but these errors were encountered: