GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfFont Class

    Namespace:
    GemBox.Pdf.Content
    Assembly:
    GemBox.Pdf.dll

    Represents a combination of a PdfFontFace and size used for drawing character glyphs.

    • C#
    • VB.NET
    public sealed class PdfFont
    Public NotInheritable Class PdfFont
    Inheritance:
    System.Object
    PdfFont

    Constructors

    PdfFont(PdfFontFace, Double)

    Initializes a new instance of the PdfFont class from the specified font face and font size.

    • C#
    • VB.NET
    public PdfFont(PdfFontFace face, double size)
    Public Sub New(face As PdfFontFace, size As Double)
    Parameters
    face
    PdfFontFace

    The font face.

    size
    System.Double

    The font size.

    Exceptions
    System.ArgumentNullException

    face cannot be null.

    System.ArgumentOutOfRangeException

    size is less than 0.

    System.ArgumentException

    size is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.

    PdfFont(PdfFontFamily, Double)

    Initializes a new instance of the PdfFont class from the specified font family and font size.

    • C#
    • VB.NET
    public PdfFont(PdfFontFamily family, double size)
    Public Sub New(family As PdfFontFamily, size As Double)
    Parameters
    family
    PdfFontFamily

    The font family.

    size
    System.Double

    The font size.

    Exceptions
    System.ArgumentNullException

    family cannot be null.

    System.ArgumentException

    size is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.

    System.ArgumentOutOfRangeException

    size is less than 0.

    PdfFont(String, Double)

    Initializes a new instance of the PdfFont class from the specified font face name and font size.

    • C#
    • VB.NET
    public PdfFont(string name, double size)
    Public Sub New(name As String, size As Double)
    Parameters
    name
    System.String

    The font face name.

    size
    System.Double

    The font size.

    Exceptions
    System.ArgumentNullException

    name cannot be null.

    System.ArgumentException

    size is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.

    System.ArgumentOutOfRangeException

    size is less than 0.

    Properties

    Face

    Gets the PdfFontFace associated with this PdfFont.

    • C#
    • VB.NET
    public PdfFontFace Face { get; }
    Public ReadOnly Property Face As PdfFontFace
    Property Value
    PdfFontFace

    The PdfFontFace associated with this PdfFont.

    Size

    Gets the size of this PdfFont.

    • C#
    • VB.NET
    public double Size { get; }
    Public ReadOnly Property Size As Double
    Property Value
    System.Double

    The size of this PdfFont.

    Methods

    ToString()

    Returns a System.String that represents this PdfFont instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this PdfFont instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Examples

    Reading text info example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.