SetSignatureCertificationLevel Method (GdPicturePDF)
In This Topic
Specifies the level of the signature certification to be used for subsequent signing of the currently loaded PDF document.
A value of PdfSignatureCertificationLevel.NotCertified defines the standard (ordinary) recipient digital signature, while other values introduce an author or certifying signatures (modification detection and prevention). Hence PDF files can be certified only once, but if permissions allow, can be digitally signed many times.
Regarding certifying signatures, the level means the author’s specification of which changes to the document will invalidate the signature. A value of PdfSignatureCertificationLevel.NoChanges indicates that the document is intended to be final; that is, any changes invalidate the signature. The values PdfSignatureCertificationLevel.FormFilling and PdfSignatureCertificationLevel.FormFillingAndAnnotations permit modifications that are appropriate for form field or comment workflow.
Syntax
Parameters
- Level
- A member of the PdfSignatureCertificationLevel enumeration. The required certification level to be used in the subsequent signing process.
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 specify a required certification level of the subsequent signing. You can find the complete sample within the ApplySignature() method's example.
Dim caption As String = "SetSignatureCertificationLevel"
Dim gdpicturePDF As New GdPicturePDF()
'Please load the PDF document you want to sign.
'Please set the corresponding certificate - this is a mandatory step.
'Please set the signature certification level.
'If this step is omitted, the value of PdfSignatureCertificationLevel.NotCertified is used.
Dim status As GdPictureStatus = gdpicturePDF.SetSignatureCertificationLevel(PdfSignatureCertificationLevel.NotCertified)
If status <> GdPictureStatus.OK Then
MessageBox.Show("The method SetSignatureCertificationLevel() 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 = "SetSignatureCertificationLevel";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
//Please load the PDF document you want to sign.
//Please set the corresponding certificate - this is a mandatory step.
//Please set the signature certification level.
//If this step is omitted, the value of PdfSignatureCertificationLevel.NotCertified is used.
GdPictureStatus status = gdpicturePDF.SetSignatureCertificationLevel(PdfSignatureCertificationLevel.NotCertified);
if (status != GdPictureStatus.OK)
{
MessageBox.Show("The method SetSignatureCertificationLevel() 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();
Example
How to specify a required certification level of the subsequent signing. You can find the complete sample within the ApplySignature() method's example.
Dim caption As String = "SetSignatureCertificationLevel"
Dim gdpicturePDF As New GdPicturePDF()
'Please load the PDF document you want to sign.
'Please set the corresponding certificate - this is a mandatory step.
'Please set the signature certification level.
'If this step is omitted, the value of PdfSignatureCertificationLevel.NotCertified is used.
Dim status As GdPictureStatus = gdpicturePDF.SetSignatureCertificationLevel(PdfSignatureCertificationLevel.NotCertified)
If status <> GdPictureStatus.OK Then
MessageBox.Show("The method SetSignatureCertificationLevel() 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 = "SetSignatureCertificationLevel";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
//Please load the PDF document you want to sign.
//Please set the corresponding certificate - this is a mandatory step.
//Please set the signature certification level.
//If this step is omitted, the value of PdfSignatureCertificationLevel.NotCertified is used.
GdPictureStatus status = gdpicturePDF.SetSignatureCertificationLevel(PdfSignatureCertificationLevel.NotCertified);
if (status != GdPictureStatus.OK)
{
MessageBox.Show("The method SetSignatureCertificationLevel() 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