SetSignatureCertificateFromSmartCard Method (GdPicturePDF)
Sets up the certificate, contained in the digital ID, from a Smart Card reader.
This certificate is later used for the subsequent signing of the currently loaded PDF document.
public GdPictureStatus SetSignatureCertificateFromSmartCard(
string ,
string ,
string
)
public function SetSignatureCertificateFromSmartCard(
: String;
: String;
: String
): GdPictureStatus;
public function SetSignatureCertificateFromSmartCard(
: String,
: String,
: String
) : GdPictureStatus;
public: GdPictureStatus SetSignatureCertificateFromSmartCard(
string* ,
string* ,
string*
)
public:
GdPictureStatus SetSignatureCertificateFromSmartCard(
String^ ,
String^ ,
String^
)
'Declaration
Public Function SetSignatureCertificateFromSmartCard( _
ByVal As String, _
ByVal As String, _
ByVal As String _
) As GdPictureStatus
Parameters
- ProviderName
- The smart card provider name, for example "Microsoft Base Smart Card Crypto Provider".
- KeyContainerName
- The key container name.
- PinCode
- The pin code of the smart card. Use the empty string to allow the application to ask for the correct pin code at the signing time.
Return Value
A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.
We strongly recommend always checking this status first.
How to set up the certificate (digital ID) from a Smart Card reader for the subsequent signing.
You can find the complete sample within the ApplySignature() method's example.
Dim caption As String = "SetSignatureCertificateFromSmartCard"
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.SetSignatureCertificateFromSmartCard("Smart-Card-Provider", "Key-Container-Name", "")
If status <> GdPictureStatus.OK Then
MessageBox.Show("The method SetSignatureCertificateFromSmartCard() 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 = "SetSignatureCertificateFromSmartCard";
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.SetSignatureCertificateFromSmartCard("Smart-Card-Provider", "Key-Container-Name", "");
if (status != GdPictureStatus.OK)
{
MessageBox.Show("The method SetSignatureCertificateFromSmartCard() 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();