I’m using MigraDoc for generating PDF documents. It works very well but I have 2 problems:
- I cannot add Polish characters (especially ł) to text like.
- I cannot add pound character (₤) to text.
I tried to change font, but no result.
I solved this on my own:)
Using Unicode fonts can be set in 2 ways:
1) by PdfDocumentRenderer constructor:
PdfDocumentRenderer pdfRenderer = new PdfDocumentRenderer(true, PdfFontEmbedding.Always);
2) by options;
PdfDocument document = new PdfDocument();
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always);
Additional example here: http://www.pdfsharp.net/wiki/Unicode-sample.ashx