PDFSharp private fonts for azure 1.50

后端 未结 2 1099
天涯浪人
天涯浪人 2021-01-20 22:07

I have downloaded and installed PDFSharp 1.5 and I am having trouble using private fonts. I have created in testing a pdf creator and it works great. When I load it into A

2条回答
  •  有刺的猬
    2021-01-20 22:27

    When using the WPF build of PDFsharp 1.50, you can implement IFontResolver in a class of your own and assign an instance of that class to GlobalFontSettings.FontResolver.

    PDFsharp 1.50 is still under construction. When it is final it should include FontResolver samples.

    Sample code can be found on the PDFsharp forum:
    http://forum.pdfsharp.net/viewtopic.php?p=8961#p8961

    Note: The XPrivateFontCollection should work with both the GDI and the WPF build. You have to use XPrivateFontCollection if you use the DocumentPreview and want to see your fonts there.
    IFontResolver is probably the best choice for processes without user interface (e.g. PDF generation on web servers), but it does not work with the GDI build.

提交回复
热议问题