Sign a random pdf document with the following code. If UseSignatureProperties=1, the produced PDF document will be corrupted and Adobe displays an error message when opening the file:
Dim signProp As New SignatureDataProperties
signProp.ContactInfo = strContactInfo
signProp.Name = strSignersName
signProp.Reason = strReason
signProp.Location = strLocation
signProp.TimeOfSigning = DateTime.Now
Dim signatureName As String = "EsignSignature"
Dim signatureField1 As SignatureField = New SignatureField(signatureName)
UseSignatureProperties = 1
If UseSignatureProperties = 1 Then
Dim sign1 = New Signature(certificate)
signatureField1.Signature = sign1
signatureField1.Signature.Properties = signProp
Else
signatureField1.Signature = New Signature(certificate)
signatureField1.Signature.Properties.ContactInfo = strContactInfo
signatureField1.Signature.Properties.Location = strLocation
signatureField1.Signature.Properties.Name = strSignersName
signatureField1.Signature.Properties.Reason = strReason
signatureField1.Signature.Properties.TimeOfSigning = DateTime.Now
End If