GdPicture.NET.14
GdPicture14 Namespace / GdPicturePDF Class / SetSignatureCertificationLevel Method
A member of the PdfSignatureCertificationLevel enumeration. The required certification level to be used in the subsequent signing process.
Example





In This Topic
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
'Declaration
 
Public Function SetSignatureCertificationLevel( _
   ByVal Level As PdfSignatureCertificationLevel _
) As GdPictureStatus
public GdPictureStatus SetSignatureCertificationLevel( 
   PdfSignatureCertificationLevel Level
)
public function SetSignatureCertificationLevel( 
    Level: PdfSignatureCertificationLevel
): GdPictureStatus; 
public function SetSignatureCertificationLevel( 
   Level : PdfSignatureCertificationLevel
) : GdPictureStatus;
public: GdPictureStatus SetSignatureCertificationLevel( 
   PdfSignatureCertificationLevel Level
) 
public:
GdPictureStatus SetSignatureCertificationLevel( 
   PdfSignatureCertificationLevel Level
) 

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.

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

Be aware that you need to set up the required certification level before you start the signing process. A PDF document can contain only one certifying signature and it must be the first added signature in this document.

This method requires the Digital Signatures component to run.

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