Hi,
I’m currently evaluating Aspose.Pdf and as for now it had all the functionalities I need. Until I tried to generate a Pdf using Postscript Type 1 fonts. I tried setting TextInfo’s members with a lot of different options, no success.
One of the fonts I’m trying to use is “HelveticaNeueLT-Thin”, it lies in PFM and PFB files that I attached to this thread in a zip file for testing).
Here’s how I set the font in my code [C#] :
textInfo.FontName = “HelveticaNeueLT-Thin”;
textInfo.FontPfmFile = Constants.FONT_DIRECTORY_URI + “lte50257.pfm”;
textInfo.FontOutlineFile = Constants.FONT_DIRECTORY_URI + “lte50257.PFB”;
textInfo.FontEncodingFile = Constants.FONT_DIRECTORY_URI + “mappings\adobe\stdenc.txt”;
textInfo.FontEncoding = “stdenc”;
//textInfo.FontEncoding = “StandardEncoding”;
//textInfo.FontEncoding = “AdobeStandardEncoding”;
textInfo being the TextInfo object of the Text object i want to set the font for.
Access to the files is correct and has been tested by opening the files in streams.
As you can see, I have tried with several font encoding names (not to mention other encoding types like winansi, iso-8859-1, CP1250,…)
I got the mapping file from the unicode repository, you can get it there.
I also tried to use the CharterBT-Roman font as AFM/PFB with no luck…
I couldn’t try with Pipe-Dream cause this font is not available on the author’s site anymore and I couldn’t find it anywhere else (in Postscript Type 1 format).
By the way, using True Type and PDF Core Fonts works perfectly.
This is really the only issue preventing me to purchase Aspose.Pdf for my project so I hope we’ll find a way to solve it !
Thanks,
Erwan
Edit : To specify the error a bit more : text just displays in Times insted of
my Font, and throws an exception (when IsFontNotFoundExceptionThrown is
set to true of course) :
“The Font ‘HelveticaNeueLT-Thin’ is not found. This font is not supported.”
when calling pdf.Save().