API Reference
PdfEmbeddedFontFamily
Represents a caller-supplied TrueType font family used by generated PDF text.
Inheritance
- Object
- PdfEmbeddedFontFamily
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
Accepted by parameters
- Method PdfDocument.UseFontFamily
- Method PdfEmbeddedFontFamily.TryFromSystem
- Method PdfFormFillerOptions.UseAppearanceFontFamily
- Method PdfOptions.RegisterFontFamily
- Method PdfOptions.RegisterNamedFontFamily
- Method PdfOptions.UseFontFamily
- Method PdfPageCompose.UseFontFamily
- Method PdfTextStyleCompose.FontFamily
Constructors
public PdfEmbeddedFontFamily(String familyName, Byte[] regular, Byte[] bold = null, Byte[] italic = null, Byte[] boldItalic = null) #Creates a reusable TrueType font family from font file bytes.
Parameters
- familyName System.String
- Family name used for generated PDF font resource names.
- regular System.Byte[]
- Regular TrueType face bytes.
- bold System.Byte[] = null
- Optional bold TrueType face bytes. When null, the regular face is reused.
- italic System.Byte[] = null
- Optional italic TrueType face bytes. When null, the regular face is reused.
- boldItalic System.Byte[] = null
- Optional bold-italic TrueType face bytes. When null, the best available supplied face is reused.
Methods
public static PdfEmbeddedFontFamily FromFiles(String familyName, String regularPath, String boldPath = null, String italicPath = null, String boldItalicPath = null) #PdfEmbeddedFontFamilyCreates a reusable TrueType font family from font files on disk.
Parameters
- familyName System.String
- regularPath System.String
- boldPath System.String = null
- italicPath System.String = null
- boldItalicPath System.String = null
public static PdfEmbeddedFontFamily FromSystem(String familyName, String pdfFamilyName = null) #PdfEmbeddedFontFamilyLoads an installed TrueType font family from common operating-system font folders.
Parameters
- familyName System.String
- Installed family name, for example Arial, Segoe UI, or DejaVu Sans.
- pdfFamilyName System.String = null
- Optional family name to expose in generated PDF font resource names.
Returns
A reusable embedded font family backed by the discovered TrueType faces.
Exceptions
FileNotFoundException– No embeddable TrueType regular face was found for familyName.
public static Boolean TryFromSystem(String familyName, out PdfEmbeddedFontFamily fontFamily, String pdfFamilyName = null) #BooleanAttempts to load an installed TrueType font family from common operating-system font folders.
Parameters
- familyName System.String
- Installed family name, for example Arial, Segoe UI, or DejaVu Sans.
- fontFamily OfficeIMO.Pdf.PdfEmbeddedFontFamily@
- When found, receives a reusable embedded font family backed by discovered TrueType faces.
- pdfFamilyName System.String = null
- Optional family name to expose in generated PDF font resource names.
Returns
true when an embeddable regular TrueType face was found; otherwise false.
Inherited Methods
Properties
public String FamilyName { get; } #Family name used for generated PDF font resource names.
public Byte[] Regular { get; } #Regular TrueType face bytes.
public Byte[] Bold { get; } #Optional bold TrueType face bytes.
public Byte[] Italic { get; } #Optional italic TrueType face bytes.
public Byte[] BoldItalic { get; } #Optional bold-italic TrueType face bytes.