Missing quote symbol in text

I’m trying to generate a pdf document that contains a piece of text with a apostrophe mark in it and the apostrophe is not appearing, any ideas on what could be causing this? Below is just a snippet of my code, if you need more than let me know.

Thank you.

VB Code Behind

Dim txtClientName As Text
txtClientName = CType(secTitlePage.Paragraphs(“txtTitle”), Text)

Dim seg1 As Segment
seg1 = txtClientName.Segments(“segTitle”)
seg1.Content = "Ruth Ann O’Sky"

XML File


<Segment ID=‘segTitle’ Alignment=“Center” FontSize=“32” FontName=“Trajan-Regular” FontEncoding=“cp1250”
IsFontEmbedded=“true” FontAfmFile=“D:\Fonts\tjrg____.afm”
FontOutlineFile=“D:\Fonts\tjrg____.pfb” FontPFMFile=“D:\Fonts\tjrg____.PFM” FontEncodingFile=“D:\Fonts\cp1250.txt”>


Dear brianm,

Thanks for your consideration.

I can’t reproduce this error. Please send me an example which can reproduce this error. If customer fonts are used, please attach them or tell me where to download them.

Well it does seem to be a font issue, such as the font appears to actually be lacking an easily generated quote symbol. Typing in Alt-0146 will create the quote symbol, but for some reason the font won’t do it using the vb char method.

Either way I went ahead and found another font that would be easier to work with, but of course I’m now having problems with it.

Below is the stack trace I receive when I attempt to create the pdf;

[ApplicationException: Can’t reencode Symbol font GoudyTrajan-Regular (using builtin).]
n.a(fj A_0, Int32 A_1, String A_2, Int32 A_3, String A_4) +411
dj.a(fj A_0, String A_1, String A_2, Int32 A_3, Boolean A_4, Boolean A_5, String A_6, Boolean A_7) +1615
fj.a(String A_0, String A_1, String A_2, String A_3, Int32 A_4, Boolean A_5, Boolean A_6, String A_7, Boolean A_8) +552
e2.a(Pdf A_0, Section A_1, Table A_2, Row A_3, Cell A_4, Text A_5, String A_6, a A_7, ck A_8) +875
cd.a(Pdf A_0, Section A_1, Table A_2, Row A_3, Cell A_4, Text A_5, a A_6, ck A_7, Boolean A_8) +1932
b9.a(Pdf A_0, Section A_1, a A_2) +779
bo.a(Pdf A_0) +319
am.a(ax A_0, Pdf A_1) +44
Aspose.Pdf.Pdf.SaveWeb(HttpResponse response) +45
AMI.print_profile.DesignProfile() +340
AMI.print_profile.Page_Load(Object sender, EventArgs e) +139
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

I’ve tried using the TrueType version of this font as well and receive a FontAFM file not found error, which I find confusing since I thought only postscript fonts used the .afm file. Either way though I don’t have a .AFM file for this font so it’s not something I can try anyways.

Below is a snippet of the XML used to call the font;

<Segment ID=‘segTitle’ Alignment=“Center” FontSize=“32” FontName=“GoudyTrajan-Regular” FontEncoding=“cp1252”
IsFontEmbedded=“true” FontPfmFile=“D:\Fonts\GOUDTRG_.PFM” FontOutlineFile=“D:/Fonts/GOUDTRG_.PFB”
FontEncodingFile=“d:/fonts/cp1252.txt”>



If you need a copy of the font or a demonstrated example of this error let me know where I can send a zip file containing fonts, vb, xml, etc…

Thank you.

Dear brianm,

Thanks for your consideration.

Please send me your complete example and fonts.

I have rewrite the “FontAFM file not found” exception message to make it clear. Please download the latest fix. If it still can’t work, please let me know.


I’ve emailed you all the files you’ll need to duplicate the error. Please let me know if you need anything more from me.

Thanks.

Dear brianm,

Thanks for your consideration.

I need time to study what’s wrong with the postscript font. But I have found the truetype font works well. Please make sure you have installed the truetype font(copy the font file into the system’s font path, “c:/windows/font” for example). You can ref to our API examples about how to use truetype font.

I’ve tried using these the truetype font by installing it into the correct fonts directory and using what I thought were the correct api/xml calls in my code, but still have problems. Is there any way you can attach or email me the code you used to get the truetype version of the font to work either in codebehind or xml, also did you embed the font?

Thanks.

Dear brianm,

Thanks for your consideration.

Here is the xml I used to test:

<?xml version="1.0" encoding="utf-8" ?>




This Is A Test: ’ ’ ’





Note that the truetype font name is “GoudyTrajan” but postscript font name is “GoudyTrajan-Regular”.