GdPicture.NET.14
GdPicture14 Namespace / GdPicturePDF Class / SetSignatureStampImage Method
The resource name of the image you want to drawn within the signature's bounding box. The image will not be drawn if the signature is invisible. For further assistance, please see the Images section of the GdPicturePDF class in the Reference Guide.
Example





In This Topic
SetSignatureStampImage Method (GdPicturePDF)
In This Topic
Sets up the required image to be drawn within the signature's bounding box. The specified resource will be applied during the subsequent signing process. If the applied signature is invisible, the image will not be drawn. If you also set the text using the SetSignatureText(String,String,Single,Color,TextAlignment,TextAlignment,Boolean) method, the image will be situated at the right side within the signature's bounding box.
Syntax
'Declaration
 
Public Function SetSignatureStampImage( _
   ByVal StampResName As String _
) As GdPictureStatus
public GdPictureStatus SetSignatureStampImage( 
   string StampResName
)
public function SetSignatureStampImage( 
    StampResName: String
): GdPictureStatus; 
public function SetSignatureStampImage( 
   StampResName : String
) : GdPictureStatus;
public: GdPictureStatus SetSignatureStampImage( 
   string* StampResName
) 
public:
GdPictureStatus SetSignatureStampImage( 
   String^ StampResName
) 

Parameters

StampResName
The resource name of the image you want to drawn within the signature's bounding box. The image will not be drawn if the signature is invisible. For further assistance, please see the Images section of the GdPicturePDF class in the Reference Guide.

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 the image to be displayed within the signature. You can find the complete sample within the ApplySignature() method's example.
Dim caption As String = "SetSignatureStampImage"
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 image to be displayed within the signature's bounding box. This step is optional.
Dim imageResName As String = gdpicturePDF.AddJpegImageFromFile("image.jpg")
Dim status As GdPictureStatus = gdpicturePDF.GetStat()
If status <> GdPictureStatus.OK Then
    MessageBox.Show("The method AddJpegImageFromFile() has failed with the status " + status.ToString(), caption)
    Goto [Error]
End If
status = gdpicturePDF.SetSignatureStampImage(imageResName)
If status <> GdPictureStatus.OK Then
    MessageBox.Show("The method SetSignatureStampImage() 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 = "SetSignatureStampImage";
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 image to be displayed within the signature's bounding box. This step is optional.
string imageResName = gdpicturePDF.AddJpegImageFromFile("image.jpg");
GdPictureStatus status = gdpicturePDF.GetStat();
if (status != GdPictureStatus.OK)
{
    MessageBox.Show("The method AddJpegImageFromFile() has failed with the status " + status.ToString(), caption);
    goto error;
}
status = gdpicturePDF.SetSignatureStampImage(imageResName);
if (status != GdPictureStatus.OK)
{
    MessageBox.Show("The method SetSignatureStampImage() 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