PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 12:08 pm

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: Thu Feb 19, 2015 5:30 pm 
Offline

Joined: Thu Feb 19, 2015 5:24 pm
Posts: 1
I'm trying to import a private font and use it for PdfSharp 1.50 (beta).

There are several references to online sample, but that refers to 1.32 (noting it should be updated with a 1.5 sample).

Code:
PdfSharp.Drawing.XPrivateFontCollection.AddFont("C:\TEMP\fonts\ARIALUNI.TTF"));


I'm doing this before generating my document, but I still receive the following:

Code:
System.ArgumentException: Font 'Arial Unicode MS' cannot be found.\r\n   at System.Drawing.FontFamily.CreateFontFamily(String name, FontCollection fontCollection) . . .


I couldn't find any way in 1.50 to link the XPrivateFontCollection to the DocumentRenderer so I assume it will just leverage Global.

Any suggestions on how I achieve this in 1.5?

Thanks.

Matt


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 19, 2015 8:23 pm 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 340
Hi!

AFAIK you have to use a FontResolver with PDFsharp 1.50. Sorry, but I cannot provide further information before Monday.

_________________
Öhmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


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 417 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