PdfSignatureAppearance Class
Represents an appearance settings for a PdfSignatureField.
public sealed class PdfSignatureAppearance : PdfFieldAppearance
Public NotInheritable Class PdfSignatureAppearance
Inherits PdfFieldAppearance
- Inheritance:
- System.ObjectPdfSignatureAppearance
Properties
BackgroundColor
Gets or sets the background color of the signature appearance.
Default value: null.
Property Value
- System.Nullable<PdfColor>
The background color of the signature appearance.
Exceptions
- System.ArgumentException
The value's Space is not device color space (DeviceGray, DeviceRGB, or DeviceCMYK).
See Also
BackgroundLayer
Gets or sets the background layer.
This layer renders the background and border of the signature field. The properties that specify the background and border exist in the PdfSignatureAppearance.
Default value: a PdfForm instance that renders the background and border of the signature field as specified by the background and border properties from this PdfSignatureAppearance.
Property Value
The background layer.
Exceptions
- System.ArgumentException
Form's bounding box must have a default origin (left and bottom must be zero) and size equal to the size of the signature field bounds.
See Also
BorderColor
Gets or sets the border color of the signature appearance.
Default value: null.
Property Value
- System.Nullable<PdfColor>
The border color of the signature appearance.
Exceptions
- System.ArgumentException
The value's Space is not device color space (DeviceGray, DeviceRGB, or DeviceCMYK).
See Also
BorderDashPattern
Gets or sets the border dash pattern of the signature appearance.
Default value: Solid.
public PdfLineDashPattern BorderDashPattern { get; set; }
Public Property BorderDashPattern As PdfLineDashPattern
Property Value
The border dash pattern of the signature appearance.
See Also
BorderStyle
Gets or sets the border style of the signature appearance.
Default value: Solid.
public PdfBorderStyle BorderStyle { get; set; }
Public Property BorderStyle As PdfBorderStyle
Property Value
The border style of the signature appearance.
Exceptions
- System.NotSupportedException
Value Unknown of enumeration PdfBorderStyle is not supported in the requested operation.
See Also
BorderWidth
Gets or sets the border thickness of the signature appearance.
Default value: 1 point.
Property Value
- System.Double
The border thickness of the signature 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
ComponentVersionLabel
Gets or sets the component version label.
This property can be used to localize the label. Default value: "GemBox.Pdf version: ".
public string ComponentVersionLabel { get; set; }
Public Property ComponentVersionLabel As String
Property Value
- System.String
The component version label.
Date
Gets or sets the time of signing.
Default value: Date.
Property Value
- System.Nullable<System.DateTimeOffset>
The time of signing.
DateFormat
Gets or sets the Date format string.
Default value: null.
Property Value
- System.String
The Date format string.
DateFormatProvider
Gets or sets the Date culture-specific formatting provider.
Default value: null.
public IFormatProvider DateFormatProvider { get; set; }
Public Property DateFormatProvider As IFormatProvider
Property Value
- System.IFormatProvider
The Date culture-specific formatting provider.
DateLabel
Gets or sets the Date label.
This property can be used to localize the label. Default value: "Date: ".
Property Value
- System.String
The Date label.
DistinguishedName
Gets or sets the distinguished name of the person or authority signing the document.
Default value: null.
Property Value
- System.String
The distinguished name of the person or authority signing the document.
DistinguishedNameLabel
Gets or sets the DistinguishedName label.
This property can be used to localize the label. Default value: "DN: ".
public string DistinguishedNameLabel { get; set; }
Public Property DistinguishedNameLabel As String
Property Value
- System.String
The DistinguishedName label.
Font
Gets or sets the font of the signature appearance text.
Default value: Helvetica of size 10 points.
Property Value
The font of the signature appearance text.
Exceptions
- System.ArgumentNullException
Value is null.
FontColor
Gets or sets the font color of the signature appearance text.
Default value: Black.
Property Value
The font color of the signature appearance text.
FontFace
Gets or sets the font face of the signature appearance text.
Default value: Helvetica.
Property Value
The font face of the signature appearance text.
Exceptions
- System.ArgumentNullException
Value is null.
FontFamily
Gets or sets the font family of the signature appearance text.
Default value: Helvetica.
Property Value
The font family of the signature appearance text.
Exceptions
- System.ArgumentNullException
Value is null.
FontSize
Gets or sets the font size of the signature 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.
Default value: 10 points.
Property Value
- System.Double
The font size of the signature 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.
FontStretch
Gets or sets the font stretch of the signature appearance text.
Default value: Normal.
public PdfFontStretch FontStretch { get; set; }
Public Property FontStretch As PdfFontStretch
Property Value
The font stretch of the signature appearance text.
FontStyle
Gets or sets the font style of the signature appearance text.
Default value: Normal.
Property Value
The font style of the signature appearance text.
FontWeight
Gets or sets the font weight of the signature appearance text.
Default value: Normal.
Property Value
The font weight of the signature appearance text.
Icon
Gets or sets the optional signature icon.
Default value: null.
Property Value
The optional signature icon.
IconAlignment
Gets or sets the two numbers that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left and bottom of the Icon.
A value of (0.0, 0.0) shall position the icon at the bottom-left corner of the annotation rectangle.
A value of (0.5, 0.5) shall center it within the rectangle.
Default value: (0.5, 0.5).
Property Value
The two numbers that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left and bottom of the Icon.
Exceptions
IconScaleCondition
Gets or sets the condition under which the Icon shall be scaled inside the annotation rectangle.
Default value: Always.
public PdfScaleCondition IconScaleCondition { get; set; }
Public Property IconScaleCondition As PdfScaleCondition
Property Value
The condition under which the Icon shall be scaled inside the annotation rectangle.
IconScaleProportional
Gets or sets a value indicating whether to scale the Icon to fit the width or height of the annotation rectangle while maintaining the icon's original aspect ratio.
If the required horizontal and vertical scaling factors are different, the smaller of the two is used, centering the icon within the annotation rectangle in the other dimension.
If false, the Icon is scaled to fill the annotation rectangle exactly, without regard to its original aspect ratio (ratio of width to height).
Default value: true.
public bool IconScaleProportional { get; set; }
Public Property IconScaleProportional As Boolean
Property Value
- System.Boolean
true to scale the Icon to fit the width or height of the annotation rectangle while maintaining the icon's original aspect ratio.; otherwise, false.
IncludeComponentVersion
Gets or sets a value indicating whether to include component version in the signature's appearance.
Default value: false.
public bool IncludeComponentVersion { get; set; }
Public Property IncludeComponentVersion As Boolean
Property Value
- System.Boolean
true if component version is included in the signature's appearance; otherwise, false.
IncludeLabels
Gets or sets a value indicating whether to include labels in the signature's appearance.
Default value: true.
Property Value
- System.Boolean
true if labels are included in the signature's appearance; otherwise, false.
LineHeight
Gets or sets the line height, or line spacing, between lines of the signature appearance text.
Default value: 11.56 points.
Property Value
- System.Double
The line height, or line spacing, between lines of the signature appearance text.
Exceptions
- System.ArgumentOutOfRangeException
Value is less than zero.
Location
Gets or sets the CPU host name or physical location of the signing.
Default value: Location.
Property Value
- System.String
The CPU host name or physical location of the signing.
LocationLabel
Gets or sets the Location label.
This property can be used to localize the label. Default value: "Location: ".
Property Value
- System.String
The Location label.
MaxTextWidth
Gets or sets the maximum text width for a line of the signature appearance text.
Default value: 0. This formats the text into an infinite width without any implicit text wrapping.
Property Value
- System.Double
The maximum text width for a line of the signature appearance text, provided in points (1/72 inch per point).
Exceptions
- System.ArgumentOutOfRangeException
Value is less than zero.
Name
Gets or sets the name of the person or authority signing the document.
Default value: Name.
Property Value
- System.String
The name of the person or authority signing the document.
NameLabel
Gets or sets the Name label.
This property can be used to localize the label. Default value: "Digitally signed by ".
Property Value
- System.String
The Name label.
Position
Gets or sets the position of the top-left corner of the signature appearance text.
Default value: (1.66, 0).
Property Value
The position of the top-left corner of the signature appearance text.
Reason
Gets or sets the reason for the signing.
Default value: Reason.
Property Value
- System.String
The reason for the signing.
ReasonLabel
Gets or sets the Reason label.
This property can be used to localize the label. Default value: "Reason: ".
Property Value
- System.String
The Reason label.
ShrinkTextOnOverflow
Gets or sets a value indicating whether the signature appearance text should be auto-fit to the bounding box of the widget annotation associated with the signature field.
Default value: false.
public bool ShrinkTextOnOverflow { get; set; }
Public Property ShrinkTextOnOverflow As Boolean
Property Value
- System.Boolean
true if the signature appearance text should be auto-fit to the bounding box of the widget annotation associated with the signature field; otherwise, false.
SignatureInvalidLayer
Gets or sets the validity layer used for the 'Signature invalid' state.
If this property is set to a non-null value, then also SignatureValidLayer property must be set to a non-null value for Adobe Reader to show the run-time created signature validity icon.
At runtime, Adobe Reader replaces the SignatureInvalidLayer with the dynamically created 100 pt x 100 pt layer that shows 'Signature invalid' icon if the signature is invalid.
Default value: null.
public PdfForm SignatureInvalidLayer { get; set; }
Public Property SignatureInvalidLayer As PdfForm
Property Value
The validity layer used for the 'Signature invalid' state.
Remarks
note
Prior to Adobe Acrobat 6.0 (released in July 2003), signature appearances were manipulated at run-time in order to display the validity of the signature. The validity was shown as a graphic icon and with an additional, optional text message. The manipulated portions of the signature appearance were contained in SignatureValidLayer, SignatureInvalidLayer and ValidityTextLayer. Beginning with version 6, Adobe Acrobat does not maintain support for signature appearances that can be manipulated, though legacy signatures with these appearances may continue to display correctly. Use of SignatureValidLayer, SignatureInvalidLayer, and ValidityTextLayer is not recommended because support of these layers in future versions of Adobe Acrobat may be discontinued at any time. Some applications will specifically warn against the presence of signatures with these layers because, for conformance with various signed document standards, signature appearances should be static.
See Also
SignatureInvalidLayerTransform
Gets or sets the transformation applied to the SignatureInvalidLayer.
Useful to reposition and resize the SignatureInvalidLayer.
Default value: Identity.
public PdfMatrix SignatureInvalidLayerTransform { get; set; }
Public Property SignatureInvalidLayerTransform As PdfMatrix
Property Value
The transformation applied to the SignatureValidLayer.
See Also
SignatureLayer
Gets or sets the signature appearance layer, containing information about the signature.
This layer renders the information about the signature. The properties that specify the font, color and the rest of the information exist in the PdfSignatureAppearance and the associated PdfSigner.
Default value: if Value is not null, a PdfForm instance that renders the information about the signature as specified by the font, color, and other properties from this PdfSignatureAppearance and the associated PdfSigner; otherwise, null.
Property Value
The signature appearance layer, containing information about the signature.
Exceptions
- System.ArgumentException
Form's bounding box must have a default origin (left and bottom must be zero) and size equal to the size of the signature field bounds.
See Also
SignatureValidLayer
Gets or sets the validity layer used for 'Signature valid' and 'Validity unknown' states.
If this property is set to a non-null value, then also SignatureInvalidLayer property must be set to a non-null value for Adobe Reader to show the run-time created signature validity icon.
At runtime, Adobe Reader replaces the SignatureValidLayer with the dynamically created 100 pt x 100 pt layer that shows either 'Signature valid' icon or 'Validity unknown' icon, depending on the state of the signature validity.
Default value: null.
public PdfForm SignatureValidLayer { get; set; }
Public Property SignatureValidLayer As PdfForm
Property Value
The validity layer used for 'Signature valid' and 'Validity unknown' states.
Remarks
note
Prior to Adobe Acrobat 6.0 (released in July 2003), signature appearances were manipulated at run-time in order to display the validity of the signature. The validity was shown as a graphic icon and with an additional, optional text message. The manipulated portions of the signature appearance were contained in SignatureValidLayer, SignatureInvalidLayer and ValidityTextLayer. Beginning with version 6, Adobe Acrobat does not maintain support for signature appearances that can be manipulated, though legacy signatures with these appearances may continue to display correctly. Use of SignatureValidLayer, SignatureInvalidLayer, and ValidityTextLayer is not recommended because support of these layers in future versions of Adobe Acrobat may be discontinued at any time. Some applications will specifically warn against the presence of signatures with these layers because, for conformance with various signed document standards, signature appearances should be static.
See Also
SignatureValidLayerTransform
Gets or sets the transformation applied to the SignatureValidLayer.
Useful to reposition and resize the SignatureValidLayer.
Default value: Identity.
public PdfMatrix SignatureValidLayerTransform { get; set; }
Public Property SignatureValidLayerTransform As PdfMatrix
Property Value
The transformation applied to the SignatureValidLayer.
See Also
TextAlignment
Gets or sets the text alignment of the signature appearance text.
Default value: Left.
public PdfTextAlignment TextAlignment { get; set; }
Public Property TextAlignment As PdfTextAlignment
Property Value
The text alignment of the signature appearance text.
Exceptions
- System.ArgumentException
TextBoundsAlignment
Gets or sets the two numbers that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left and bottom of the signature appearance text bounds.
A value of (0.0, 0.0) shall position the signature appearance text bounds at the bottom-left corner of the annotation rectangle.
A value of (0.5, 0.5) shall center it within the rectangle.
If FontSize is 0 or if ShrinkTextOnOverflow is true and the signature appearance text overflows then the scaled signature appearance text might allocate the entire leftover space at the left or at the bottom (or both) of the signature appearance text bounds and the alignment specified in that direction won't have any effect.
Default value: (0, 1). This positions the signature appearance text bounds at the top-left corner of the annotation rectangle.
public PdfPoint TextBoundsAlignment { get; set; }
Public Property TextBoundsAlignment As PdfPoint
Property Value
The two numbers that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left and bottom of the signature appearance text bounds.
Exceptions
TextExtent
Gets or sets the number that shall be between 0.0 and 1.0 indicating the fraction of the annotation rectangle size to allocate for the text. The rest is allocated for the Icon.
Applicable only if Icon is not null.
Default value: 0.5.
Property Value
- System.Double
The number that shall be between 0.0 and 1.0 indicating the fraction of the annotation rectangle size to allocate for the text.
Exceptions
TextPlacement
public PdfTextPlacement TextPlacement { get; set; }
Public Property TextPlacement As PdfTextPlacement
Property Value
The placement of the signature text relative to the Icon.
ValidityTextLayer
Gets or sets the text layer used for a text representation of the state of the signature.
If this property is set to a non-null value, then also SignatureValidLayer and SignatureInvalidLayer properties must be set to a non-null value for Adobe Reader to show the run-time created signature validity text message.
At runtime, Adobe Reader replaces the ValidityTextLayer with the dynamically created layer of the same size that shows the signature validity text message.
Default value: null.
Property Value
The text layer used for a text representation of the state of the signature.
Remarks
note
Prior to Adobe Acrobat 6.0 (released in July 2003), signature appearances were manipulated at run-time in order to display the validity of the signature. The validity was shown as a graphic icon and with an additional, optional text message. The manipulated portions of the signature appearance were contained in SignatureValidLayer, SignatureInvalidLayer and ValidityTextLayer. Beginning with version 6, Adobe Acrobat does not maintain support for signature appearances that can be manipulated, though legacy signatures with these appearances may continue to display correctly. Use of SignatureValidLayer, SignatureInvalidLayer, and ValidityTextLayer is not recommended because support of these layers in future versions of Adobe Acrobat may be discontinued at any time. Some applications will specifically warn against the presence of signatures with these layers because, for conformance with various signed document standards, signature appearances should be static.
See Also
ValidityTextLayerTransform
Gets or sets the transformation applied to the ValidityTextLayer.
Useful to reposition and resize the ValidityTextLayer.
Default value: Identity.
public PdfMatrix ValidityTextLayerTransform { get; set; }
Public Property ValidityTextLayerTransform As PdfMatrix
Property Value
The transformation applied to the ValidityTextLayer.
See Also
Methods
ToString()
Returns a Unicode text contained in this PdfSignatureAppearance.
Returns
- System.String
A Unicode text contained in this PdfSignatureAppearance.
Overrides
Update(PdfSigner)
Updates the appearance of widget annotation associated with the current PdfSignatureField based on the specified signer
, Value, and properties of this PdfSignatureAppearance.
Parameters
signer
- PdfSigner
The signer.
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) |