GdPicture.NET.14
GdPicture14 Namespace / GdPicturePDF Class / SetSignatureTimestampInfo Method
The required Time Stamp Server's URL to be used when signing. Supported are TCP and HTTP/HTTPS formatted URLs.
The username corresponding with the account created on the specified server, if available. You can use an empty string if you are uncertain.

The parameter is not used when the server's URL is in TCP format.

The password for the corresponding account, if available. You can use an empty string if you are uncertain.

The parameter is not used when the server's URL is in TCP format.

Example





In This Topic
SetSignatureTimestampInfo Method (GdPicturePDF)
In This Topic
Specifies the Time Stamp Server and the corresponding credentials, if you want to use timestamping for the subsequent signing of the currently loaded PDF document.
Syntax
'Declaration
 
Public Function SetSignatureTimestampInfo( _
   ByVal TSURL As String, _
   ByVal TSUsername As String, _
   ByVal TSUserpass As String _
) As GdPictureStatus
public GdPictureStatus SetSignatureTimestampInfo( 
   string TSURL,
   string TSUsername,
   string TSUserpass
)
public function SetSignatureTimestampInfo( 
    TSURL: String;
    TSUsername: String;
    TSUserpass: String
): GdPictureStatus; 
public function SetSignatureTimestampInfo( 
   TSURL : String,
   TSUsername : String,
   TSUserpass : String
) : GdPictureStatus;
public: GdPictureStatus SetSignatureTimestampInfo( 
   string* TSURL,
   string* TSUsername,
   string* TSUserpass
) 
public:
GdPictureStatus SetSignatureTimestampInfo( 
   String^ TSURL,
   String^ TSUsername,
   String^ TSUserpass
) 

Parameters

TSURL
The required Time Stamp Server's URL to be used when signing. Supported are TCP and HTTP/HTTPS formatted URLs.
TSUsername
The username corresponding with the account created on the specified server, if available. You can use an empty string if you are uncertain.

The parameter is not used when the server's URL is in TCP format.

TSUserpass
The password for the corresponding account, if available. You can use an empty string if you are uncertain.

The parameter is not used when the server's URL is in TCP format.

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.

Remarks
This method is only allowed for use with non-encrypted documents.

Just to remind you that if you want to apply the defined settings during the signing, you need to set up the required parameters before you start the signing process. But using this method in the whole process is optional.

This method requires the Digital Signatures component to run.

Example
How to set up timestamp information for the subsequent signing. You can find the complete sample within the ApplySignature() method's example.
Dim caption As String = "SetSignatureTimestampInfo"
Dim gdpicturePDF As New GdPicturePDF()
            
'Please load the PDF document you want to sign.
            
'Please set the corresponding certificate - this is a mandatory step.
            
'Set the timestamp information. This step is optional.
Dim status As GdPictureStatus = gdpicturePDF.SetSignatureTimestampInfo("your_time_stamp_server_url", "your_username", "your_password")
If status <> GdPictureStatus.OK Then
    MessageBox.Show("The method SetSignatureTimestampInfo() 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 = "SetSignatureTimestampInfo";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
            
//Please load the PDF document you want to sign.
            
//Please set the corresponding certificate - this is a mandatory step.
            
//Set the timestamp information. This step is optional.
GdPictureStatus status = gdpicturePDF.SetSignatureTimestampInfo("your_time_stamp_server_url", "your_username", "your_password");
if (status != GdPictureStatus.OK)
{
    MessageBox.Show("The method SetSignatureTimestampInfo() 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();
See Also