{{ title }}

This sample shows how to draw text using different fonts. Read More

Standard fonts

Out of the box PdfDocument supports the following fonts: Courier, Helvetica, Times, Symbol, ZapfDingbats. The first three fonts have four typefaces each, "normal", "bold", "oblique" and "bold oblique". This gives us a set of fonts known as "14 Standard PDF fonts".

Setting up the font

The PdfFont class describes a particular font and its constructor accepts the following arguments:

The following instance is the default document font in terms of PdfDocument:

new wijmo.pdf.PdfFont("times", 10, "normal", "normal")

Using the font

In PdfDocument, the font can be specified in two ways:

If font with exact given style and weight properties is not found, then the closest registered font will be used.

This sample shows how to use drawText and doc.setFont methods to draw text using different fonts.