Click or drag to resize
Pdf Library for .NET

PdfFontCreateFromBytes Method

Loads a TrueType / OpenType font from an in-memory byte array and creates a PdfFont. Convenience wrapper around CreateFromStream(Stream, Single); 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 CreateFromBytes(
	byte[] fontData,
	float size
)

Parameters

fontData  Byte
The raw TrueType / OpenType font file bytes.
size  Single
The font size in points.

Return Value

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