HtmlToPdfDefaultFont Property |
Namespace: MailBee.Pdf
Exception | Condition |
---|---|
MailBeeInvalidArgumentException | value is a null reference (Nothing in Visual Basic). |
iTextSharp library contains the following fonts inside, which can be loaded by name:
The internal fonts do not support multi-language encoding and thus the user should load the font which has proper encoding manually.
This property can be assigned in the following ways:
DefaultFont = FontFactory.GetFont("Helvetica", _defaultFontSize, iTextSharp.text.Font.NORMAL);
FontFactory.RegisterDirectory(Environment.SystemDirectory + @"\..\Fonts"); DefaultFont = FontFactory.GetFont("Arial", "windows-1255", <span style="color: blue;">true</span>, (<span style="color: blue;">float</span>)10, iTextSharp.text.Font.ITALIC);
BaseFont baseFont = BaseFont.CreateFont(@"C:\WINDOWS\Fonts\Arial.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); DefaultFont = <span style="color: blue;">new</span> iTextSharp.text.Font(baseFont, iTextSharp.text.Font.DEFAULTSIZE, iTextSharp.text.Font.NORMAL);