Click or drag to resize

PdfFontResource Constructor (String, String, String)

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: (
public PdfFontResource(
	string displayName,
	string cssName,
	string trueTypeName


Type: SystemString
The name of the font resource when displayed to the user.
Type: SystemString
The CSS font family used for displaying text in this font in a web browser.
Type: SystemString
The name of the TrueType font used when adding a PdfTextShape or PdfField to a PDF.

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.

The trueTypeName parameter must be the exact name of a TrueType font family installed on the server running RAD PDF. The font must have permissions allowing the font to be embedded.

The following example creates a new font resource:
new FontResource("Comic Sans", "Comic Sans, Arial, sans-serif", "Comic Sans MS");
See Also