API Reference

Class

PdfEmbeddedFontFamily

Namespace OfficeIMO.Pdf
Assembly OfficeIMO.Pdf
Modifiers sealed

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.

Accepted by parameters

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 requiredposition: 0
Family name used for generated PDF font resource names.
regular System.Byte[] requiredposition: 1
Regular TrueType face bytes.
bold System.Byte[] = null optionalposition: 2
Optional bold TrueType face bytes. When null, the regular face is reused.
italic System.Byte[] = null optionalposition: 3
Optional italic TrueType face bytes. When null, the regular face is reused.
boldItalic System.Byte[] = null optionalposition: 4
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) #
Returns: PdfEmbeddedFontFamily

Creates a reusable TrueType font family from font files on disk.

Parameters

familyName System.String requiredposition: 0
regularPath System.String requiredposition: 1
boldPath System.String = null optionalposition: 2
italicPath System.String = null optionalposition: 3
boldItalicPath System.String = null optionalposition: 4
public static PdfEmbeddedFontFamily FromSystem(String familyName, String pdfFamilyName = null) #
Returns: PdfEmbeddedFontFamily

Loads an installed TrueType font family from common operating-system font folders.

Parameters

familyName System.String requiredposition: 0
Installed family name, for example Arial, Segoe UI, or DejaVu Sans.
pdfFamilyName System.String = null optionalposition: 1
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) #
Returns: Boolean

Attempts to load an installed TrueType font family from common operating-system font folders.

Parameters

familyName System.String requiredposition: 0
Installed family name, for example Arial, Segoe UI, or DejaVu Sans.
fontFamily OfficeIMO.Pdf.PdfEmbeddedFontFamily@ requiredposition: 1
When found, receives a reusable embedded font family backed by discovered TrueType faces.
pdfFamilyName System.String = null optionalposition: 2
Optional family name to expose in generated PDF font resource names.

Returns

true when an embeddable regular TrueType face was found; otherwise false.

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.