API Documentation for SignatureField
NoPoDoFo SignatureField
A SignatureField is a type of Form field that contains a digital signature. This class is not derived from the Field base class. A signature field can present a graphical interface prompting the user to "sign" the document. The process of signing a Document requires a combination of this class and the Signer class, for an example please see the signing cookbook.
class SignatureField {
new(annotation: Annotation, doc: Document): SignatureField
setAppearanceStream(xObj: any, appearance: NPDFAnnotationAppearance, name: string): void
setReason(reason: string): void
setLocation(location: string): void
setCreator(creator: string): void
setDate(dateTime?: string): void
addCertificateReference(perm: NPDFCertificatePermission): void
setFieldName(name: string): void
getObject(): Object
ensureSignatureObject(): void
}
Constructors
new(annotation: Annotation, doc: Document): SignatureField
Create a new instance of a SignatureField object. The Annotation must be of type Widget
.
Properties
Methods
setAppearanceStream
setAppearanceStream(xObj: any, appearance: NPDFAnnotationAppearance, name: string): void
Set an appearance stream for this field. Setting the appearance stream AP
is comprised of a set of instructions written
to an XObject, the type of appearance as one of NPDFAnnotationAppearance, and an optional name for the state of
the appearance. Please familiarize yourself with the spec section
12.5.5 for proper usage.
setReason(reason: string): void
Set signature reason
setLocation(location: string): void
Set signature location
setCreator(creator: string): void
Set creator of signature
setDate(dateTime?: string|nopodofo.Date): void
Set the date of signature
addCertificateReference(perm: NPDFCertificatePermission): void
Add certification dictionaries and references to the Document catalog Document modification permission as NPDFCertificatePermission
setFieldName(name: string): void
Set the name of the signature field
getObject(): Object
Get the signature object
ensureSignatureObject(): void
Ensure the signature field has set a signature Object.
If the signature object has not been set a Sig
object is created and added to
the field dictionary. This is useful for when creating an instance of this class from
an existing annotation to ensure the signature object is set.