Click or drag to resize
Pdf Library for .NET

PdfFontCreateFromStream Method

Loads a TrueType / OpenType font from a Stream and creates a PdfFont. The stream must be positioned at the start of the font data and is read synchronously in full. The font is subset-embedded into the output.

Namespace: SelectPdf.Universal
Assembly: SelectPdf.HtmlToPdf.Universal (in SelectPdf.HtmlToPdf.Universal.dll) Version: 26.4
Syntax
public static PdfFont CreateFromStream(
	Stream fontStream,
	float size
)

Parameters

fontStream  Stream
A readable stream positioned at the start of the font data.
size  Single
The font size in points.

Return Value

PdfFont
A new PdfFont backed by the embedded TrueType font.
Exceptions
ExceptionCondition
PdfDocumentExceptionThrown when the stream does not contain a valid TrueType / OpenType font.
See Also