Persits Software, Inc. Web Site
 Navigator:  Home |  Object Reference |  PdfFonts
PdfForm PdfFont
  PdfFonts Object
PdfFonts is a collection of PdfFont objects obtainable via PdfDocument's Fonts property. The PdfFonts collection can be used to obtain standard PDF fonts, as well as non-standard fonts installed on the machine. This object also makes it possible to load TrueType/OpenType fonts directly from their .TTF or .OTF files. For more information about font management, see Section 6.2 - Font Management. Implements IEnumerable.

Properties Methods


int Count (Read-only)

Returns the current number of PdfFont objects in the collection. Initially, the PdfFonts collection is empty and this property returns 0.

this [ int Index ] As PdfFont (Read-only)
this [ string Face ] As PdfFont (Read-only)
this [ string Face, pdfCharSets CharSet ] As PdfFont (Read-only)

Returns a PdfFont object specified either by a 1-based integer index, or by font name.

Index is an integer between 1 and Count specifying the font index in the collection.

Face is a font name. There are two possibilities:


PdfFont LoadFromFile ( string Path )
Loads a TrueType or OpenType font directly from a .ttf or .otf file specified by Path. The font does not have to be properly installed on the machine (i.e. appear in the Fonts control panel).

As of Version, .ttc files (TrueType collections) are supported as well. By default, the very first font in the collection is loaded. A 1-based font index can optionally be appended to the path, separated by a comma.


PdfFont objFont = objDoc.Fonts.LoadFromFile(@"c:\windows\fonts\arial.ttf");

PdfFont objFont = objDoc.Fonts.LoadFromFile(@"c:\windows\fonts\gulim.ttc");

PdfFont objFont = objDoc.Fonts.LoadFromFile(@"c:\windows\fonts\gulim.ttc,3");

For more information about font management, see Section 6.2 - Font Management.

PdfForm PdfFont

Newsletter Signup

Other Products
  This site is owned and maintained by Persits Software, Inc. Copyright © 2003 - 2014. All Rights Reserved.