PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Sat Apr 04, 2026 2:09 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules

Also see our new Tailored Support & Services site.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Dec 08, 2009 10:09 am 
Offline
Supporter

Joined: Fri May 15, 2009 3:28 pm
Posts: 96
Hi,

I am trying to check if a particular font is installed on the user's PC. Currently I am doign this:
Code:
__FontName = "Arial Unicode MS";
            string _fontName = "";
            System.Drawing.Font font = new System.Drawing.Font("Arial Unicode MS", 12);
            if (font.Name == __FontName)
            {
                MigFont = new MigraDoc.DocumentObjectModel.Font("Arial Unicode MS");
                _fontName = "Arial Unicode MS";
            }
            else
            {
                MigFont = new MigraDoc.DocumentObjectModel.Font("Arial");
                _fontName = "Arial";
            }

but this only seems to pick up if the font is installed on the server the code is deployed on. Is there as way in .NET i can check (and use) if the font is installed on the users PC? I cant add the font to the server becuase it is Arial Unicode and licenced, so i dont want to infringe that.

thanks,

Mike


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 08, 2009 12:19 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3144
Location: Cologne, Germany
Hi!

I presume you are using ASP.NET.

The code runs on the server and can only use fonts installed on the server.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 08, 2009 12:21 pm 
Offline
Supporter

Joined: Fri May 15, 2009 3:28 pm
Posts: 96
Hi,

Yes i am using ASP.NET - I didnt realise that was the case. Its fair enough though...

Thanks anyway,

Mike


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

All times are UTC


Who is online

Users browsing this forum: GPT and 756 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:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group