 |
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.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntaxpublic static PdfFont CreateFromStream(
Stream fontStream,
float size
)
Public Shared Function CreateFromStream (
fontStream As Stream,
size As Single
) As PdfFont
Parameters
- fontStream Stream
- A readable stream positioned at the start of the font data.
- size Single
- The font size in points.
Return Value
PdfFontA new
PdfFont backed by the embedded TrueType font.
Exceptions| Exception | Condition |
|---|
| PdfDocumentException | Thrown when the stream does not contain a valid TrueType / OpenType font. |
See Also