Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfFontFamily

    Show / Hide Table of Contents

    Class PdfFontFamily

    Indicates type of standard PDF fonts.

    Inheritance
    System.Object
    PdfFontFamily
    Namespace: Syncfusion.Pdf.Graphics
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public sealed class PdfFontFamily : Enum
    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)

    Fields

    Courier

    Represents the Courier font.

    Declaration
    public const PdfFontFamily Courier
    Field Value
    Type Description
    PdfFontFamily

    Helvetica

    Represents the Helvetica font.

    Declaration
    public const PdfFontFamily Helvetica
    Field Value
    Type Description
    PdfFontFamily

    Symbol

    Represents the Symbol font.

    Declaration
    public const PdfFontFamily Symbol
    Field Value
    Type Description
    PdfFontFamily

    TimesRoman

    Represents the Times Roman font.

    Declaration
    public const PdfFontFamily TimesRoman
    Field Value
    Type Description
    PdfFontFamily

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32

    ZapfDingbats

    Represents the ZapfDingbats font.

    Declaration
    public const PdfFontFamily ZapfDingbats
    Field Value
    Type Description
    PdfFontFamily
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved