PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 16, 2024 1:54 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Mar 12, 2013 8:55 pm 
Offline

Joined: Tue Mar 12, 2013 8:45 pm
Posts: 1
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.aspx

So 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


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 13, 2013 9:50 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
Is your program running "full trust" on the server? AFAIK this is still required to embed fonts.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 168 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group