PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Jul 05, 2024 4:21 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed May 08, 2013 3:13 pm 
Offline

Joined: Wed May 08, 2013 10:56 am
Posts: 17
Are there any guides/samples on using a custom font with MigraDoc?

Ideally I'd like to register the font and then declare it in my Document.Styles.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 08, 2013 3:28 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
See the Private Fonts sample for PDFsharp. Same technique works when creating PDF files with MigraDoc.

http://www.pdfsharp.net/wiki/PrivateFonts-sample.ashx

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed May 08, 2013 3:41 pm 
Offline

Joined: Wed May 08, 2013 10:56 am
Posts: 17
Hi Thomas,

That code sample does not seem very complete. For example,

Code:
this.fontFamilies.Add(key, fontFamily);


What is "this"?

And do we need to add the WPF libraries for this to work?


Top
 Profile  
Reply with quote  
PostPosted: Wed May 08, 2013 4:03 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Works only with the WPF build (currently).
The source ZIP file contains the complete sample code (the web site shows snippets only).

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 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