SignDoc Class Documentation

classSignDoc : SystemIDisposable

Namespace:Datalogics::PDFL

Inherits from:
SystemIDisposable

Detailed Description

Implementation of the PDF SignDoc function.

Use the SignDoc object to digitally sign a document

Referenced by

Constructor & Destructor Documentation

SignDoc

SignDoc(SignDocrhs, InternalConstructsignifier)

Parameters

rhs: SignDoc
signifier: InternalConstruct

SignDoc

SignDoc()

Creates an empty SignDoc object and initializes memory for its parameters.

~SignDoc

~SignDoc()

Property Documentation

CredentialDataFormat

CredentialDataFmtCredentialDataFormat[get, set]

DigestCategory

DigestCategoryDigestCategory[get, set]

DocSignType

SignatureTypeDocSignType[get, set]

FieldID

SignatureFieldIDFieldID[get, set]

FieldName

stringFieldName[get, set]

OutputPath

stringOutputPath[get, set]

SignatureBoxPageNumber

uintSignatureBoxPageNumber[get, set]

SignatureBoxRectangle

RectSignatureBoxRectangle[get, set]

Member Function Documentation

AddDigitalSignature

voidAddDigitalSignature(Documentdocument)

Parameters

document: Document

The Document to be digitally signed.

Returns:

void

Adds a digital signature using the specified credentials.

If the document has not been previously signed, signs and saves the entire document. If the document has been previously signed, signs and saves only the portions of the document that have changed. If the document has been previously signed and the path to which the file is saved is NULL or the same as the path specified by the parameter, doc, signs and copies the document, saving only the portions of the document that have changed.

AddSigPolicy

intAddSigPolicy(stringoid)

Parameters

oid: string

Object Identifier (OID) of the signature policy to add.

Returns:

- The number of signature policies added to the signature.

Add a signature policy to the PAdES signature being generated. Signature policies may be applied to PAdES signatures, only. The signature type must be set to PADES prior to adding a policy.

AddSigPolicyQualifierURI

voidAddSigPolicyQualifierURI(stringuri)

Parameters

uri: string

URI pointing to the signature policy document.

Returns:

void

Qualify an existing signature policy with a Signature Policy URI (SPuri) qualifier. A policy must be added via AddSigPolicy prior to calling this method. A signature policy may be qualified by no more than one policy qualifier.

AddSigPolicyQualifierUserNotice

voidAddSigPolicyQualifierUserNotice(stringdisplayText, stringorg, System.Collections.Generic.IList< System.Int64 >noticeNos)

Parameters

displayText: string

Text to display to the user when the signature is verified.

org: string

Organization that prepared the notice.

noticeNos: System.Collections.Generic.IList< System.Int64 >

Group of integers that identify textual statements prepared by the organization.

Returns:

void

Qualify an existing signature policy with a Signature Policy UserNotice (SPUserNotice) qualifier. A policy must be added via AddSigPolicy prior to calling this method. A signature policy may be qualified by no more than one policy qualifier. The displayText and org attributes can be defined independent of each other. However, a valid org attribute must be defined in order to qualify a PAdES signature policy with the noticeNos attribute.

ConstructorRetrieve

static SignDocConstructorRetrieve(System.IntPtrignored)

Parameters

ignored: System.IntPtr

Returns:

SignDoc

CreateCancelProc

voidCreateCancelProc(CancelProccancelProc)

Parameters

cancelProc: CancelProc

The CancelProc to receive cancel callbacks during signing.

Returns:

void

Creates and registers a cancel callback for the signing operation.

CreateProgressMonitor

voidCreateProgressMonitor(ProgressMonitorprogMon)

Parameters

progMon: ProgressMonitor

The ProgressMonitor to receive progress callbacks during signing.

Returns:

void

Creates and registers a progress monitor for the signing operation.

Dispose

voidDispose()

Returns:

void

DisposeChildren

voidDisposeChildren()

Returns:

void

SetFieldObject

voidSetFieldObject(intaValue, intbValue)

Parameters

aValue: int

a value of the CosObject.

bValue: int

b value of the CosObject.

Returns:

void

Set the form field CosObject option.

SetNonPfxPassPhrase

voidSetNonPfxPassPhrase(stringpassPhrase, uintpassphraseSize, CredentialStorageFmtstorageFmt)

Parameters

passPhrase: string

Passphrase used to encrypt Non-PFX private key. Should be set to NULL if unencrypted.

passphraseSize: uint

Passphrase size in bytes. Shall be set to 0 if private key is unencrypted or passphrase is stored on disk.

storageFmt: CredentialStorageFmt

Storage format for passphrase.

Returns:

void

Set the passphrase used to decrypt Non-PFX credentials.

Note: The passphrase provided must use the exact same character encoding used to encrypt the private key. The application makes no effort whatsoever to re-encode the same.

SetNonPfxPrivateKey

voidSetNonPfxPrivateKey(stringprivateKey, uintkeySize, CredentialStorageFmtstorageFmt)

Parameters

privateKey: string

Private key.

keySize: uint

Size of private key in bytes. Shall be set to 0 if key is stored on disk.

storageFmt: CredentialStorageFmt

Storage format for private key.

Returns:

void

Set the private key for Non-PFX credentials..

SetNonPfxSignerCert

voidSetNonPfxSignerCert(stringsignerCert, uintcertSize, CredentialStorageFmtstorageFmt)

Parameters

signerCert: string

Signer certificate

certSize: uint

Size of signer certificate in bytes. Shall be set to 0 if certificate is stored on disk.

storageFmt: CredentialStorageFmt

Storage format for the signer certificate.

Returns:

void

Set the signer certificate for Non-PFX credentials.

SetPfxCredentials

voidSetPfxCredentials(stringcredentials, CredentialStorageFmtstorageFmt)

Parameters

credentials: string

Credentials in PFX/PKCS#12 file format.

storageFmt: CredentialStorageFmt

Storage format for the signer certificate. (Only OnDisk is allowed for this option)

Returns:

void

Set PFX/PKCS#12 credentials.

SetPfxPassPhrase

voidSetPfxPassPhrase(stringpassphrase, uintpassphraseSize, CredentialStorageFmtstorageFmt)

Parameters

passphrase: string

Passphrase used to encrypt PFX/PKCS#12 credentials. Shall be set to NULL if credentials are unencrypted.

passphraseSize: uint

Passphrase size in bytes. Shall be set to 0 if PFX credentials are unencrypted or passphrase is stored on disk.

storageFmt: CredentialStorageFmt

Storage format for PFX/PKCS#12 credentials.

Returns:

void

Set the passphrase used to decrypt PFX/PKCS#12 credentials. Note: The passphrase provided must use the exact same character encoding used to encrypt the PFX credentials. The application makes no effort whatsoever to re-encode the same.

SetSignerInfo

voidSetSignerInfo(stringlogoFilePath, floatlogoOpacity, stringname, stringlocation, stringreason, stringcontactInfo, DisplayTraitsdisplayTraits)

Parameters

logoFilePath: string

Image to display as part of signature appearance.

logoOpacity: float

Opacity of image to display as part of signature appearance.

name: string

Name of the person or authority signing the document.

location: string

CPU host name or physical location of the signing.

reason: string

Reason for signing the document.

contactInfo: string

Information provided by the signer to enable recipients to contact signer for signature verification.

displayTraits: DisplayTraits

Fields to display as part of signature appearance.

Returns:

void

Set Signer Info.