Click or drag to resize

PdfFontResource Constructor (String, String, PdfFontResourceStandard)

Create a new PDF font resource used by the PdfWebControl and other aspects of RAD PDF.

Namespace:  RadPdf.Integration
Assembly:  RadPdf (in RadPdf.dll) Version: 3.44.0.0 (3.44.0.0)
Syntax
public PdfFontResource(
	string displayName,
	string cssName,
	PdfFontResourceStandard standardFont
)

Parameters

displayName
Type: SystemString
The name of the font resource when displayed to the user.
cssName
Type: SystemString
The CSS font family used for displaying text in this font in a web browser.
standardFont
Type: RadPdf.IntegrationPdfFontResourceStandard
The Standard Type 1 font used when adding a PdfTextShape or PdfField to a PDF. This parameter must not be None.
Remarks

If a displayName is used containing the words "Arial", "Courier", "Helvetica" or "Times", RAD PDF may automatically substitute one of the four default fonts if the default fonts are not removed using Remove(PdfFontResource) or Clear.

The cssName parameter can be a single client side font resource or several font names as a "fallback" system. If the client's browser does not support the first font, it tries the next font, in order from left to right. It is typically best to end with a generic family (e.g. sans-serif, serif, monospace). In most cases, font family names may be either quoted (e.g. 'Courier New', 'Courier'), or unquoted (e.g. Courier New, Courier). Font family names containing most punctuation characters and digits should be quoted or escaped. Meaning that the string literal "39 Tall Text" will not work in some browsers; instead "\'39 Tall Text\'" should be used.

TrueTypeName will be set just as it is for the built-in fonts (ArialFontResource, CourierFontResource, and TimesFontResource).

Examples
The following example creates a new font resource:
C#
new FontResource("Courier", "Courier New, Courier, monospace", PdfFontResourceStandard.Courier);
See Also