Table of Contents

Enum PdfFontFamily

Namespace
Syncfusion.Pdf.Graphics
Assembly
Syncfusion.Pdf.Portable.dll

Indicates type of standard PDF fonts.

public enum PdfFontFamily

Fields

Courier = 1

Represents the Courier font.

Helvetica = 0

Represents the Helvetica font.

Symbol = 3

Represents the Symbol font.

TimesRoman = 2

Represents the Times Roman font.

ZapfDingbats = 4

Represents the ZapfDingbats font.

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a page to the document.
PdfPage page = document.Pages.Add();
//Create PDF graphics for the page.
PdfGraphics graphics = page.Graphics;
//Create a new PDF font instance.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12, PdfFontStyle.Bold);
//Draw string to PDF page.
graphics.DrawString("Hello World!", font, PdfBrushes.Black, PointF.Empty);
//Save the document.
document.Save("Output.pdf");
//Close the document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create PDF graphics for the page.
Dim graphics As PdfGraphics = page.Graphics
'Create a new PDF font instance.
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12, PdfFontStyle.Bold)
'Draw string to PDF page.
graphics.DrawString("Hello World!", font, PdfBrushes.Black, PointF.Empty)
'Save the document.
document.Save("Output.pdf")
'Close the document.
document.Close(True)