I realize that there is no support for private fonts with GDI+ and PDFSharp after reading some threads here and also checking out the source code.
However when I checked out the .NET classes used in the code I saw that there was .NET support for loading fonts. I'm talking about this method:
http://msdn.microsoft.com/en-us/library ... tfile.aspxSo basically I just made a call to that and downloaded a random font that I would be sure my friends did not own and I added the font using this method and set the embedding options to Always when creating the XFont. The font was loaded correctly and when I sent the PDF to my friends they could see the text in the font that they did not have installed.
Perfect I thought, and uploaded the code to my web hosting. Unfortunately, the PDF comes back with some default font set. Since I can't debug the site at the web hosting service I put some logging into it. It seems the font is loaded and the XFont is created with the correct name etc. The fonts are even embedded when I check the fonts of the generated PDF.
I've made sure I only add the font once. I'm running an ASP.NET MVC3 site and it's running .NET 4.0.
Anyone got any ideas of what it could be? I'm at a total loss.
Thanks