Asif Mehmood
Asif Mehmood

Reputation: 984

FontResolver to add **Myriad Pro** Font in PDFsharp 1.32

I am looking to add the Font(Myriad Pro) to the PDF Invoice generated via PDFsharp, but unable to do so.

What I have tried so far is:

Upvotes: 1

Views: 3012

Answers (1)

The font resolver is a global setting (as user "spender" pointed out in their comments). This global settings is shared by all instances of PdfDocument() and it can be set only once.

The font resolver is a new feature of PDFsharp 1.50 (there was a breaking change with beta 2, so samples for beta 1 may no longer work with the current beta 3). For PDFsharp 1.32 a different approach must be used.

When using the WPF build of PDFsharp 1.32, you will find a sample that shows the usage of private fonts in the samples folder that comes with the source package of PDFsharp (sample folder is PrivateFonts).

Upvotes: 2

Related Questions