Last active
September 5, 2022 13:46
-
-
Save bjoerntx/1a3901ea1614c7945871cda7c1d7d6a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get the SignatureField by Name | |
TXTextControl.SignatureField signatureField = | |
textControl1.SignatureFields.GetItem("txsign_1"); | |
// set the image | |
signatureField.Image = new TXTextControl.SignatureImage("signature.svg", 1); | |
// create a new digital signature | |
X509Certificate2 cert = new X509Certificate2("mycert.pfx", "123"); | |
TXTextControl.DigitalSignature signature = | |
new TXTextControl.DigitalSignature(cert, null, "txsign_1"); | |
// add the signatures | |
TXTextControl.SaveSettings saveSettings = new TXTextControl.SaveSettings() { | |
SignatureFields = new TXTextControl.DigitalSignature[] { signature } | |
}; | |
// export the document | |
textControl1.Save("results.pdf", TXTextControl.StreamType.AdobePDF, saveSettings); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment