SetSignaturePos Method (GdPicturePDF)
In This Topic
Sets up the coordinates and dimensions of the signature's bounding box within the current page of the loaded PDF document. This is the location,
where the signature is placed after the successful signing of the current document. If you omit this method in the signing process, or you set the width
or the height to 0, the signature will not be drawn, that means it becomes invisible on the current page.
Syntax
'Declaration
Public Function SetSignaturePos( _
ByVal As Single, _
ByVal As Single, _
ByVal As Single, _
ByVal As Single _
) As GdPictureStatus
public GdPictureStatus SetSignaturePos(
float ,
float ,
float ,
float
)
public function SetSignaturePos(
: Single;
: Single;
: Single;
: Single
): GdPictureStatus;
public function SetSignaturePos(
: float,
: float,
: float,
: float
) : GdPictureStatus;
public: GdPictureStatus SetSignaturePos(
float ,
float ,
float ,
float
)
public:
GdPictureStatus SetSignaturePos(
float ,
float ,
float ,
float
)
Parameters
- StampLeft
- The horizontal (X) coordinate of the bottom left point of the signature's bounding box,
expressed in the current units specified by the SetMeasurementUnit method with respect to the currently defined origin, related to the current page.
- StampBottom
- The vertical (Y) coordinate of the bottom left point of the signature's bounding box,
expressed in the current units specified by the SetMeasurementUnit method with respect to the currently defined origin, related to the current page.
- StampWidth
- The width of the signature's bounding box, expressed in the current units specified by the SetMeasurementUnit method. If you set the width to 0, the signature becomes invisible.
- StampHeight
- The height of the signature's bounding box, expressed in the current units specified by the SetMeasurementUnit method. If you set the height to 0, the signature becomes invisible.
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.
Example
How to set the signature's location on the current page. You can find the complete sample within the ApplySignature() method's example.
Dim caption As String = "SetSignaturePos"
Dim gdpicturePDF As New GdPicturePDF()
'Please load the PDF document you want to sign.
'Please set the corresponding certificate - this is a mandatory step.
'Setting the origin for easier positioning the signature on the page.
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
'Set the signature's location on the current page. This step is optional.
'If this step is omitted, the signature will be invisible.
status = gdpicturePDF.SetSignaturePos(200, 500, 200, 100)
If status <> GdPictureStatus.OK Then
MessageBox.Show("The method SetSignaturePos() 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 = "SetSignaturePos";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
//Please load the PDF document you want to sign.
//Please set the corresponding certificate - this is a mandatory step.
//Setting the origin for easier positioning the signature on the page.
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft);
//Set the signature's location on the current page. This step is optional.
//If this step is omitted, the signature will be invisible.
status = gdpicturePDF.SetSignaturePos(200, 500, 200, 100);
if (status != GdPictureStatus.OK)
{
MessageBox.Show("The method SetSignaturePos() 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