Table of Contents

Method AddFont

Namespace
BitMiracle.Docotic.Pdf.Gdi
Assembly
BitMiracle.Docotic.Pdf.Gdi.dll

AddFont(PdfDocument, string, FontStyle)

Adds the new font with specified properties to the end of the collection of document fonts.

public static PdfFont? AddFont(this PdfDocument doc, string fontFace, FontStyle fontStyle)

Parameters

doc PdfDocument

The document.

fontFace string

The name of the font face.

fontStyle FontStyle

The FontStyle of the new font.

Returns

PdfFont

The newly added PdfFont or null if there is no font with specified face installed.

Remarks

If requested font does not have bold or italic version then bold or italic version will be synthesized when needed.

AddFont(PdfDocument, Font)

Adds the new font with the properties of the specified Font to the end of the collection of document fonts.

public static PdfFont? AddFont(this PdfDocument doc, Font font)

Parameters

doc PdfDocument

The document.

font Font

The existing Font from which to create the new PdfFont.

Returns

PdfFont

The newly added PdfFont.