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

    Show / Hide Table of Contents

    PdfVariableTextAppearance Class

    Namespace:
    GemBox.Pdf.Forms
    Assembly:
    GemBox.Pdf.dll

    Represents an appearance settings for a variable text fields PdfTextField, PdfDropdownField and PdfListBoxField.

    • C#
    • VB.NET
    public sealed class PdfVariableTextAppearance : PdfFieldAppearance
    Public NotInheritable Class PdfVariableTextAppearance
        Inherits PdfFieldAppearance
    Inheritance:
    System.Object
    PdfAppearance
    PdfFieldAppearance
    PdfVariableTextAppearance

    Properties

    BackgroundColor

    Gets or sets the background color of the variable text field appearance.

    • C#
    • VB.NET
    public PdfColor? BackgroundColor { get; set; }
    Public Property BackgroundColor As PdfColor?
    Property Value
    System.Nullable<PdfColor>

    The background color of the variable text field appearance.

    Exceptions
    System.ArgumentException

    The value's Space is not device color space (DeviceGray, DeviceRGB, or DeviceCMYK).

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.6.19 Widget Annotations'

    BorderColor

    Gets or sets the border color of the variable text field appearance.

    • C#
    • VB.NET
    public PdfColor? BorderColor { get; set; }
    Public Property BorderColor As PdfColor?
    Property Value
    System.Nullable<PdfColor>

    The border color of the variable text field appearance.

    Exceptions
    System.ArgumentException

    The value's Space is not device color space (DeviceGray, DeviceRGB, or DeviceCMYK).

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.6.19 Widget Annotations'

    BorderDashPattern

    Gets or sets the border dash pattern of the variable text field appearance.

    • C#
    • VB.NET
    public PdfLineDashPattern BorderDashPattern { get; set; }
    Public Property BorderDashPattern As PdfLineDashPattern
    Property Value
    PdfLineDashPattern

    The border dash pattern of the variable text field appearance.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.4 Border Styles'

    BorderStyle

    Gets or sets the border style of the variable text field appearance.

    • C#
    • VB.NET
    public PdfBorderStyle BorderStyle { get; set; }
    Public Property BorderStyle As PdfBorderStyle
    Property Value
    PdfBorderStyle

    The border style of the variable text field appearance.

    Exceptions
    System.NotSupportedException

    Value Unknown of enumeration PdfBorderStyle is not supported in the requested operation.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.4 Border Styles'

    BorderWidth

    Gets or sets the border thickness of the variable text field appearance.

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

    The border thickness of the variable text field appearance.

    Exceptions
    System.ArgumentOutOfRangeException

    Value is less than 0.

    System.ArgumentException

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

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.4 Border Styles'

    FontColor

    Gets or sets the font color of the field's appearance text.

    • C#
    • VB.NET
    public PdfColor FontColor { get; set; }
    Public Property FontColor As PdfColor
    Property Value
    PdfColor

    The font color of the field's appearance text.

    FontFace

    Gets or sets the font face of the field's appearance text.

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

    The font face of the field's appearance text.

    Exceptions
    System.ArgumentNullException

    Value is null.

    FontSize

    Gets or sets the font size of the field's appearance text.

    A zero value for size means that the font shall be auto-sized: its size shall be computed as a function of the size of the annotation rectangle.

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

    The font size of the field's appearance text.

    Exceptions
    System.ArgumentException

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

    System.ArgumentOutOfRangeException

    Value is less than 0.

    LineHeight

    Gets or sets the line height, or line spacing, between lines of the PdfTextField appearance text (if the MultiLine is true).

    Default value: 0 (the default line height is automatically calculated, and is based on the FontFace and the FontSize).

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

    The line height, or line spacing, between lines of the PdfTextField appearance text.

    Exceptions
    System.ArgumentOutOfRangeException

    Value is less than zero.

    TextAlignment

    Gets or sets the text alignment of the field's appearance text.

    • C#
    • VB.NET
    public PdfTextAlignment TextAlignment { get; set; }
    Public Property TextAlignment As PdfTextAlignment
    Property Value
    PdfTextAlignment

    The text alignment of the field's appearance text.

    Exceptions
    System.ArgumentException

    Left, Center and Right alignments are supported for field's appearance text.

    TextStrikethrough

    Gets or sets the strikethrough text decoration of the field's appearance text.

    • C#
    • VB.NET
    public PdfTextDecoration TextStrikethrough { get; set; }
    Public Property TextStrikethrough As PdfTextDecoration
    Property Value
    PdfTextDecoration

    The strikethrough text decoration of the field's appearance text.

    Remarks
    note

    The TextUnderline is not preserved in a PDF file when the PdfDocument is saved to a PDF file.

    TextUnderline

    Gets or sets the underline text decoration of the field's appearance text.

    • C#
    • VB.NET
    public PdfTextDecoration TextUnderline { get; set; }
    Public Property TextUnderline As PdfTextDecoration
    Property Value
    PdfTextDecoration

    The underline text decoration of the field's appearance text.

    Remarks
    note

    The TextUnderline is not preserved in a PDF file when the PdfDocument is saved to a PDF file.

    Inherited Properties

    Orientation

    (Optional) The number of degrees by which the widget annotation shall be rotated counterclockwise relative to the page.

    The value shall be a multiple of 90.

    Default value: 0.

    (Inherited from PdfFieldAppearance)

    State

    (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams").

    (Inherited from PdfAppearance)

    Inherited Methods

    BeginInit()

    Begins initialization of the PdfAppearance.

    Call EndInit() to end the initialization and update the appearance.

    If BeginInit() is called on a PdfAppearance that is already being initialized, the second and subsequent calls are ignored.

    (Inherited from PdfAppearance)

    EndInit()

    Ends initialization of the PdfAppearance by updating the changed appearance.

    This method will be ignored if called on a PdfAppearance that is not being initialized.

    (Inherited from PdfAppearance)

    Get()

    Gets the appearance form for the Normal appearance trigger and the current appearance State.

    (Inherited from PdfAppearance)

    Get(PdfAppearanceTrigger)

    Gets a collection of appearance states and the associated appearance forms for the specified appearance trigger.

    (Inherited from PdfAppearance)

    Get(PdfAppearanceTrigger, PdfAppearanceState)

    Gets the appearance form for the specified appearance trigger and appearance state.

    (Inherited from PdfAppearance)

    Refresh()

    Forces an update of the appearance.

    (Inherited from PdfAppearance)

    Set(PdfAppearanceTrigger, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<PdfAppearanceState, PdfForm>>)

    Sets a collection of appearance states and the associated appearance forms for the specified appearance trigger.

    (Inherited from PdfAppearance)

    Set(PdfAppearanceTrigger, PdfAppearanceState, PdfForm)

    Sets the appearance form for the specified appearance trigger and appearance state.

    (Inherited from PdfAppearance)

    Set(PdfForm)

    Sets the appearance form for the Normal appearance trigger and the current appearance State.

    (Inherited from PdfAppearance)

    See Also

    PDF Specification ISO 32000-1:2008, section '12.7.3.3 Variable Text'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.