PdfAppearance Class
Represents an appearance settings for a PdfAnnotation.
- Inheritance:
- System.ObjectPdfAppearance
- Derived
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").
Property Value
The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.
See Also
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.
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.
Get()
Returns
See Also
Get(PdfAppearanceTrigger)
Gets a collection of appearance states and the associated appearance forms for the specified appearance trigger.
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
Get(PdfAppearanceTrigger, PdfAppearanceState)
Gets the appearance form for the specified appearance trigger and appearance state.
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
The appearance form for the specified appearance trigger and appearance state.
See Also
Refresh()
Forces an update of the appearance.
Set(PdfAppearanceTrigger, PdfAppearanceState, PdfForm)
Sets the appearance form for the specified appearance trigger and appearance state.
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.
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.