Click or drag to resize
Pdf Library for .NET

PdfFontCollectionAdd(PdfSystemFont, Boolean) Method

Resolves the system font described by systemFont and adds it to the collection.

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public PdfFont Add(
	PdfSystemFont systemFont,
	bool embedFont
)

Parameters

systemFont  PdfSystemFont
Family / size / style descriptor.
embedFont  Boolean
Must be true. The resolved system font is always embedded (the only safe choice when the viewer may not have the same system fonts as the host that produced the PDF). Passing false throws PdfDocumentException — use Add(PdfStandardFont) or Add(PdfStandardCJKFont) if you need a non-embedded font reference.

Return Value

PdfFont
The PdfFont wrapper for the added font.
Exceptions
ExceptionCondition
PdfDocumentExceptionThrown when embedFont is false, or the family is not installed on the host.
See Also