When importing specific documents and signing a predefined SignatureField leads to not successfully validated signatures in Adobe, but successfully validated in other pdf viewers (eg. Telerik WPF PdfViewer, Foxit PDF Reader).
Solution:
When signing an existing document (after the import) we must be sure the AcroForm's ViewersShouldRecalculateWidgetAppearances property is set to false, otherwise, the exported and signed PDF document could not be shown as a signed.
if (document.AcroForm.ViewersShouldRecalculateWidgetAppearances)
{
document.AcroForm.ViewersShouldRecalculateWidgetAppearances = false;
}
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 'THIS WOULD FAIL
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 'THIS WORKS
End If
Observed: the following dialog appears:
They are exported with the /EmbeddedFiles switch. This would allow adding external files to the PDF document.
You can convert the document to PDF and use the approach bellow: Currently, silent async printing may be achieved by using RadPdfViewer WPF control. Sample demo showing how to achieve this may be seen at the following forum post: http://www.telerik.com/forums/pdfviewer-print-makes-ui-unresponsive#js0YdzFWc0Oa8C3g6a18lg The RadPdfViewer WPF control used does not need to be displayed, making this demo a good workaround for ASP.NET AJAX clients.