Dim caption As String = "SetSignatureCertificateFromStore"
Dim gdpicturePDF As New GdPicturePDF()
'Please load the PDF document you want to sign.
'This is the first step in the signing process. It is the mandatory step. Select the method according to your preference.
Dim status As GdPictureStatus = gdpicturePDF.SetSignatureCertificateFromStore("serial-number-of-your-certificate")
'Or you can use the empty string instead to allow the application to give you a list of certificates in the current user's store.
'GdPictureStatus status = gdpicturePDF.SetSignatureCertificateFromStore("");
If status <> GdPictureStatus.OK Then
MessageBox.Show("The method SetSignatureCertificateFromStore() has failed with the status: " + status.ToString(), caption)
Goto [Error]
End If
'Please see the complete sample in the ApplySignature() method for next steps to follow.
[error]:
gdpicturePDF.Dispose()
string caption = "SetSignatureCertificateFromStore";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
//Please load the PDF document you want to sign.
//This is the first step in the signing process. It is the mandatory step. Select the method according to your preference.
GdPictureStatus status = gdpicturePDF.SetSignatureCertificateFromStore("serial-number-of-your-certificate");
//Or you can use the empty string instead to allow the application to give you a list of certificates in the current user's store.
//GdPictureStatus status = gdpicturePDF.SetSignatureCertificateFromStore("");
if (status != GdPictureStatus.OK)
{
MessageBox.Show("The method SetSignatureCertificateFromStore() has failed with the status: " + status.ToString(), caption);
goto error;
}
//Please see the complete sample in the ApplySignature() method for next steps to follow.
error:
gdpicturePDF.Dispose();