PdfSignatureFieldSign Method (String, String)
Initiate signing of a PDF file with a digital ID available as a file with the specified path and the password protecting the private key.
Digital ID files generally have a PFX for P12 extension and contain the public key (Certificate) and the associated private key.
The name of the preferred signature handler to use when validating the signature (Filter entry) is Adobe.PPKLite, the Format of the returned PdfSignature instance is PKCS7 and the ContentsLength is 2199 bytes.
To finish the signing, call any of the Save Overload. Next signing cannot be initiated before the current one is not finished.
This method is supported in GemBox.Pdf for .NET Standard if your project references NuGet package System.Security.Cryptography.Pkcs.
public PdfSignature Sign( string digitalIdFilePath, string digitalIdPassword )
Public Function Sign ( digitalIdFilePath As String, digitalIdPassword As String ) As PdfSignature
|InvalidOperationException||This PdfSignatureField is not contained in the Fields of this PDF document. -or- Signing of the PDF file has already been initiated on some PdfSignatureField in this PDF document. Finish that signing by calling any of the Save Overload before initiating a new signing on this PdfSignatureField.|