SetSignatureStampImage Method (GdPicturePDF)
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,GdPictureColor,TextAlignment,TextAlignment,Boolean) method, the image will be situated at the right side within the signature's bounding box.
'Declaration
Public Function SetSignatureStampImage( _
ByVal As String _
) As GdPictureStatus
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.
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();