1

Importing and Processing Signature Fields from MS Word in C#

 1 year ago
source link: https://www.textcontrol.com/blog/2023/01/06/importing-and-processing-signature-fields-from-ms-word-in-csharp/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

The TX Text Control SignatureField objects are compatible to the Signature Line element in MS Word. This article shows how to insert those elements in MS Word in order to import and process these objects in TX Text Control.

Creating Signature Lines in MS Word

To create a document in MS Word that contains a signature line, use the Signature Line button in the Text ribbon group of the Insert ribbon tab.

Signature Line in MS Word

In the opened dialog, additional information can be added to the signature line. These values are available in the SignatureField class when importing the document into TX Text Control.

Signature Line in MS Word

After clicking OK, the signature line is inserted into the document.

Signature Line in MS Word

Processing SignatureFields

After loading the document into TX Text Control, the signature lines are accessible through the SignatureFieldCollection .

All signature properties have been imported:

TX Text Control provides additional SignerData properties to be compatible to the Adobe PDF format when signing PDF documents.

Description
Address Gets the address of a suggested signer.
ContactInfo Gets contact information of a suggested signer, such as a phone number.
Name Gets the name of a suggested signer.
Reason Gets a reason why the document is signed.
Title Gets the title of a suggested signer.

Signing SignatureFields

An X509Certificate2 certificate object is created from a PFX file that is then assigned to all signature fields. The list of signatures is provided through the SignatureFields property to the Save method to export the signed document as an Adobe PDF document.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK