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

    Show / Hide Table of Contents

    PdfAppearance Class

    Namespace:
    GemBox.Pdf.Annotations
    Assembly:
    GemBox.Pdf.dll

    Represents an appearance settings for a PdfAnnotation.

    • C#
    • VB.NET
    public abstract class PdfAppearance
    Public MustInherit Class PdfAppearance
    Inheritance:
    System.Object
    PdfAppearance
    Derived
    PdfCaretAppearance
    PdfFileAttachmentAppearance
    PdfFreeTextAppearance
    PdfLinkAppearance
    PdfPencilMarkAppearance
    PdfRedactionAppearance
    PdfSquareCircleAppearance
    PdfStampAppearance
    PdfStickyNoteAppearance
    PdfTextMarkupAppearance
    PdfFieldAppearance

    Properties

    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").

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

    The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.2 Annotation Dictionaries'

    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.

    • C#
    • VB.NET
    public void BeginInit()
    Public Sub BeginInit
    Remarks

    GemBox.Pdf detects the first change to PdfAppearance and sets the PdfAppearance as the current changing appearance of the PdfDocument.

    The PdfAppearance remains the current changing appearance of the PdfDocument until:

    • The EndInit() is called on PdfAppearance of the current changing appearance of the PdfDocument.
    • Another PdfAppearance is changed, thus implicitly updating the current changing appearance and setting the newly changed appearance as the current changing appearance of the PdfDocument.
    • GemBox.Pdf determines that the current changing appearance should be updated such as when saving a PdfDocument to a file or cloning a PdfDocument or a PdfPage.

    To override this behavior, call BeginInit() method before and EndInit() method after initializing the PdfAppearance to take control of when the changed appearance is updated.

    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.

    • C#
    • VB.NET
    public void EndInit()
    Public Sub

    Get()

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

    • C#
    • VB.NET
    public PdfForm Get()
    Public Function Get As PdfForm
    Returns
    PdfForm

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

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.5 Appearance Streams'

    Get(PdfAppearanceTrigger)

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

    • C#
    • VB.NET
    public ICollection<KeyValuePair<PdfAppearanceState, PdfForm>> Get(PdfAppearanceTrigger trigger)
    Public Function Get(trigger As PdfAppearanceTrigger) As ICollection(Of KeyValuePair(Of PdfAppearanceState, PdfForm))
    Parameters
    trigger
    PdfAppearanceTrigger

    The appearance trigger for which to get a collection of appearance states and the associated appearance forms.

    Returns
    System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<PdfAppearanceState, PdfForm>>

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

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.5 Appearance Streams'

    Get(PdfAppearanceTrigger, PdfAppearanceState)

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

    • C#
    • VB.NET
    public PdfForm Get(PdfAppearanceTrigger trigger, PdfAppearanceState state)
    Public Function Get(trigger As PdfAppearanceTrigger, state As PdfAppearanceState) As PdfForm
    Parameters
    trigger
    PdfAppearanceTrigger

    The appearance trigger for which to get the appearance form.

    state
    PdfAppearanceState

    The appearance state for which to get the appearance form.

    Returns
    PdfForm

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

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.5 Appearance Streams'

    Refresh()

    Forces an update of the appearance.

    • C#
    • VB.NET
    public void Refresh()
    Public Sub Refresh

    Set(PdfAppearanceTrigger, PdfAppearanceState, PdfForm)

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

    • C#
    • VB.NET
    public void Set(PdfAppearanceTrigger trigger, PdfAppearanceState state, PdfForm value)
    Public Sub Set(trigger As PdfAppearanceTrigger, state As PdfAppearanceState, value As PdfForm)
    Parameters
    trigger
    PdfAppearanceTrigger

    The appearance trigger for which to set the appearance form.

    state
    PdfAppearanceState

    The appearance state for which to set the appearance form.

    value
    PdfForm

    The appearance form to set for the specified appearance trigger and appearance state.

    Set(PdfAppearanceTrigger, ICollection<KeyValuePair<PdfAppearanceState, PdfForm>>)

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

    • C#
    • VB.NET
    public void Set(PdfAppearanceTrigger trigger, ICollection<KeyValuePair<PdfAppearanceState, PdfForm>> value)
    Public Sub Set(trigger As PdfAppearanceTrigger, value As ICollection(Of KeyValuePair(Of PdfAppearanceState, PdfForm)))
    Parameters
    trigger
    PdfAppearanceTrigger

    The appearance trigger for which to set a collection of appearance states and the associated appearance forms.

    value
    System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<PdfAppearanceState, PdfForm>>

    A collection of appearance states and the associated appearance forms to set for the specified appearance trigger.

    Set(PdfForm)

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

    • C#
    • VB.NET
    public void Set(PdfForm value)
    Public Sub Set(value As PdfForm)
    Parameters
    value
    PdfForm

    The appearance form to set for the Normal appearance trigger and the current appearance State.

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.