PdfDocument.AddFont Method (Stream, Boolean, Boolean)

Creates a new font with specified properties using provided stream with font bytes and adds the new font to the end of the collection of document fonts.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public PdfFont AddFont(
	Stream fontStream,
	bool bold,
	bool italic
)
VB
Public Function AddFont ( 
	fontStream As Stream,
	bold As Boolean,
	italic As Boolean
) As PdfFont

Parameters

fontStream
Type: System.IO.Stream
The stream with the font bytes.
bold
Type: System.Boolean
if set to true then added font will be bold.
italic
Type: System.Boolean
if set to true then added font will be italic.

Return Value

Type: PdfFont
The newly added PdfFont.

Remarks

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

This method accepts OpenType, TrueType, and Type1 font files.

See Also