| FontCreate Method |
Create a new font object from font file data.
Supported formats are:
-
Type1
-
CFF
-
TrueType
-
OpenType
The returned font object is not yet used on any page, but it is associated with the given target document.
Namespace: PdfTools.FourHeights.PdfToolbox.Pdf.ContentAssembly: PdfTools.FourHeights.PdfToolbox (in PdfTools.FourHeights.PdfToolbox.dll) Version: 4.4.6+c8104d9b5f50644b2c93d424e62edbf40828fde7
Syntax public static Font Create(
Document targetDocument,
Stream stream,
bool embedded
)
Parameters
- targetDocument Document
-
the output document with which the returned object is associated
- stream Stream
-
the font file data stream
- embedded Boolean
- if the font shall be embedded in the document.
Note that this parameter must be for PDF/A documents.
Return Value
Font
the newly created font object
Exceptions Exception | Condition |
---|
IOException | Error reading from the font file or writing to the document |
UnknownFormatException | The font data has an unknown format |
CorruptException | The font data is corrupt |
ConformanceException | Parameter embedded is for PDF/A document |
ArgumentException | if the targetDocument argument has already been closed |
ArgumentException | if the targetDocument argument is read-only |
ArgumentException | if the stream argument is |
ArgumentNullException | if targetDocument is . |
ArgumentNullException | if stream is . |
See Also