How do I set the default font and font size for a PDF document using iIextSharp so that it is used throughout the PDF.
Met the same issue with Russian and Romanian alphabets(itextsharp 5.5.6.0, .net 3.5
). I've just added:
string arialuniTff = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), "ARIALUNI.TTF");
FontFactory.Register(arialuniTff);
StyleSheet ST = new StyleSheet();
ST.LoadTagStyle(HtmlTags.BODY, HtmlTags.FACE, "Arial Unicode MS");
ST.LoadTagStyle(HtmlTags.BODY, HtmlTags.ENCODING, BaseFont.IDENTITY_H)
and
parser.SetStyleSheet(ST);
but before you start parsing your TextReader add:
parser.Parse(reader);
Otherwise it won't work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With