Poppler Qt6 24.03.0
Public Types | Public Member Functions | List of all members
Poppler::FormFieldSignature Class Reference

#include <poppler-form.h>

Inheritance diagram for Poppler::FormFieldSignature:
Inheritance graph
[legend]
Collaboration diagram for Poppler::FormFieldSignature:
Collaboration graph
[legend]

Public Types

enum  SignatureType {
  UnknownSignatureType , AdbePkcs7sha1 , AdbePkcs7detached , EtsiCAdESdetached ,
  UnsignedSignature
}
 
enum  SigningResult { FieldAlreadySigned , GenericSigningError , SigningSuccess }
 
enum  ValidateOptions { ValidateVerifyCertificate = 1 , ValidateForceRevalidation = 2 , ValidateWithoutOCSPRevocationCheck = 4 , ValidateUseAIACertFetch = 8 }
 
- Public Types inherited from Poppler::FormField
enum  AdditionalActionType { FieldModified , FormatField , ValidateField , CalculateField }
 
enum  FormType { FormButton , FormText , FormChoice , FormSignature }
 

Public Member Functions

SigningResult sign (const QString &outputFileName, const PDFConverter::NewSignatureData &data) const
 
SignatureType signatureType () const
 
FormType type () const override
 
SignatureValidationInfo validate (int opt, const QDateTime &validationTime) const
 
SignatureValidationInfo validate (ValidateOptions opt) const
 
 ~FormFieldSignature () override
 
- Public Member Functions inherited from Poppler::FormField
std::unique_ptr< LinkactivationAction () const
 
std::unique_ptr< LinkadditionalAction (AdditionalActionType type) const
 
std::unique_ptr< LinkadditionalAction (Annotation::AdditionalActionType type) const
 
QString fullyQualifiedName () const
 
int id () const
 
bool isPrintable () const
 
bool isReadOnly () const
 
bool isVisible () const
 
QString name () const
 
QRectF rect () const
 
void setName (const QString &name) const
 
void setPrintable (bool value)
 
void setReadOnly (bool value)
 
void setVisible (bool value)
 
QString uiName () const
 

Detailed Description

A form field that represents a signature.

Member Enumeration Documentation

◆ SignatureType

The types of signature fields.

Enumerator
UnsignedSignature 
Since
22.02

◆ SigningResult

Since
22.02
Enumerator
FieldAlreadySigned 

Trying to sign a field that is already signed.

◆ ValidateOptions

The validation options of this signature.

Enumerator
ValidateVerifyCertificate 

Validate the certificate.

ValidateForceRevalidation 

Force revalidation of the certificate.

ValidateWithoutOCSPRevocationCheck 

Do not contact OCSP servers to check for certificate revocation status.

Since
21.10
ValidateUseAIACertFetch 

Use the AIA extension for certificate fetching.

Since
21.10

Member Function Documentation

◆ sign()

SigningResult Poppler::FormFieldSignature::sign ( const QString &  outputFileName,
const PDFConverter::NewSignatureData data 
) const

Signs a field of UnsignedSignature type.

Ignores data.page(), data.fieldPartialName() and data.boundingRectangle()

Since
22.02

◆ type()

FormType Poppler::FormFieldSignature::type ( ) const
overridevirtual

The type of the field.

Implements Poppler::FormField.

◆ validate() [1/2]

SignatureValidationInfo Poppler::FormFieldSignature::validate ( int  opt,
const QDateTime &  validationTime 
) const

Validate the signature with validationTime as validation time.

Reset signature validatation info of scoped instance.

Note
depending on the backend, some options are only partially respected. In case of the NSS backend, the two options requiring network access, AIAFetch and OCSP, can be toggled individually. In case of the GPG backend, if either OCSP is used or AIAFetch is used, the other one is also used.

◆ validate() [2/2]

SignatureValidationInfo Poppler::FormFieldSignature::validate ( ValidateOptions  opt) const

Validate the signature with now as validation time.

Reset signature validatation info of scoped instance.

Note
depending on the backend, some options are only partially respected. In case of the NSS backend, the two options requiring network access, AIAFetch and OCSP, can be toggled individually. In case of the GPG backend, if either OCSP is used or AIAFetch is used, the other one is also used.

The documentation for this class was generated from the following file: