Type Default Read Only Description

[Visual Basic]
0 No The current Font ID.




The font used for drawing text.

This property holds the current Font ID and determines the style of text that is added to the document using methods like AddText.

To get a Font ID you need to add your font to the current document using the AddFont method.

The Font property is an accessor for the the XTextStyle.Font property.




The following example adds two blocks of styled text to a document. The first block is in Helvetica and the second in Courier.


using (Doc doc = new Doc()) {   doc.FontSize = 96; // big text   doc.Font = doc.AddFont("Helvetica");   doc.AddText("Helvetica Text.");   doc.Font = doc.AddFont("Courier");   doc.AddText("Courier Text.");   doc.Save(Server.MapPath("docfont.pdf")); }