34#ifndef _POPPLER_QT6_FORM_H_
35#define _POPPLER_QT6_FORM_H_
41#include <QtCore/QDateTime>
42#include <QtCore/QVector>
43#include <QtCore/QList>
44#include <QtCore/QRectF>
45#include <QtCore/QStringList>
46#include <QtCore/QSharedPointer>
47#include "poppler-export.h"
48#include "poppler-annotation.h"
49#include "poppler-qt6.h"
54class FormWidgetButton;
56class FormWidgetChoice;
57class FormWidgetSignature;
65class FormFieldIconData;
74 friend class FormFieldIconData;
84 FormFieldIconData *d_ptr;
92 friend class FormFieldData;
204 explicit FormField(std::unique_ptr<FormFieldData> dd);
206 std::unique_ptr<FormFieldData> m_formData;
296 FormFieldText(DocumentData *doc, ::Page *p, ::FormWidgetText *w);
470class CertificateInfoPrivate;
490 KuDigitalSignature = 0x80,
491 KuNonRepudiation = 0x40,
492 KuKeyEncipherment = 0x20,
493 KuDataEncipherment = 0x10,
494 KuKeyAgreement = 0x08,
495 KuKeyCertSign = 0x04,
497 KuEncipherOnly = 0x01,
634 QSharedPointer<CertificateInfoPrivate> d_ptr;
641class SignatureValidationInfoPrivate;
671 CertificateVerificationInProgress
679 HashAlgorithmUnknown,
761 QSharedPointer<SignatureValidationInfoPrivate> d_ptr;
769class AsyncObjectPrivate;
783 std::unique_ptr<AsyncObjectPrivate> d;
797 UnknownSignatureType,
809 ValidateVerifyCertificate = 1,
810 ValidateForceRevalidation = 2,
811 ValidateWithoutOCSPRevocationCheck = 4,
812 ValidateUseAIACertFetch = 8
906 SigningResult sign(
const QString &outputFileName,
const PDFConverter::NewSignatureData &data)
const;
989void POPPLER_QT6_EXPORT
setNSSDir(
const QString &pathURL);
AdditionalActionType
Describes the flags from an annotations 'AA' dictionary.
Definition poppler-annotation.h:438
Definition poppler-form.h:771
Definition poppler-form.h:472
PublicKeyType publicKeyType() const
The public key type.
bool isSelfSigned() const
Returns true if certificate is self-signed otherwise returns false.
QByteArray certificateData() const
The DER encoded certificate.
QString issuerInfo(EntityInfoKey key) const
Information about the issuer.
QString subjectInfo(EntityInfoKey key) const
Information about the subject.
KeyLocation keyLocation() const
The storage location for this key.
bool checkPassword(const QString &password) const
Checks if the given password is the correct one for this certificate.
int version() const
The certificate version string.
int publicKeyStrength() const
The strength of public key in bits.
bool isQualified() const
Can be used to do qualified electronic signatures (legally binding)
bool isNull() const
Returns true if certificate has no contents; otherwise returns false.
Q_DECLARE_FLAGS(KeyUsageExtensions, KeyUsageExtension) enum EntityInfoKey
Predefined keys for elements in an entity's distinguished name.
Definition poppler-form.h:500
QDateTime validityEnd() const
The date-time when certificate expires.
QByteArray serialNumber() const
The certificate serial number.
KeyUsageExtension
Certificate key usage extensions.
Definition poppler-form.h:489
PublicKeyType
The algorithm of public key.
Definition poppler-form.h:478
KeyUsageExtensions keyUsageExtensions() const
The uses allowed for the certificate.
QDateTime validityStart() const
The date-time when certificate becomes valid.
QByteArray publicKey() const
The public key value.
KeyLocation
A signing key can be located in different places sometimes.
Definition poppler-form.h:524
QString nickName() const
The certificate internal database nickname.
A form field that represents a text input.
Definition poppler-form.h:283
void setAppearanceText(const QString &text)
Sets the text inside the Appearance Stream to the specified text.
TextType
The particular type of this text field.
Definition poppler-form.h:289
@ Multiline
A multiline text field.
Definition poppler-form.h:291
@ Normal
A simple singleline text field.
Definition poppler-form.h:290
void setText(const QString &text)
Sets the text associated with the text field to the specified text.
QString text() const
The text associated with the text field.
double getFontSize() const
The font size of the text in the form field.
void setFontSize(int fontSize)
Set the font size of the text in the form field (currently only as integer)
~FormFieldText() override
*/
bool canBeSpellChecked() const
Whether the text inserted manually in the field (where possible) can be spell-checked.
bool isPassword() const
Whether this text field is a password input, eg its text must be replaced with asterisks.
TextType textType() const
The text type of the text field.
Qt::Alignment textAlignment() const
The horizontal alignment for the text of this text field.
FormType type() const override
The type of the field.
int maximumLength() const
The maximum length for the text of this field, or -1 if not set.
bool isRichText() const
Whether this text field should allow rich text.
Definition poppler-form.h:643
QString signerName() const
The signer name associated with the signature.
QList< qint64 > signedRangeBounds() const
Get the bounds of the ranges of the document which are signed.
QByteArray signature() const
Get the signature binary data.
HashAlgorithm hashAlgorithm() const
The hash algorithm used for the signature.
bool signsTotalDocument() const
Checks whether the signature authenticates the total document except for the signature itself.
CertificateInfo certificateInfo() const
The signer certificate info.
CertificateStatus
The verification result of the certificate.
Definition poppler-form.h:663
@ CertificateUntrustedIssuer
The issuer of this certificate has been marked as untrusted by the user.
Definition poppler-form.h:665
@ CertificateUnknownIssuer
The certificate trust chain has not finished in a trusted root certificate.
Definition poppler-form.h:666
@ CertificateGenericError
The certificate could not be verified.
Definition poppler-form.h:669
@ CertificateRevoked
The certificate was revoked by the issuing certificate authority.
Definition poppler-form.h:667
@ CertificateTrusted
The certificate is considered trusted.
Definition poppler-form.h:664
@ CertificateNotVerified
The certificate is not yet verified.
Definition poppler-form.h:670
@ CertificateExpired
The signing time is outside the validity bounds of this certificate.
Definition poppler-form.h:668
HashAlgorithm
The hash algorithm of the signature.
Definition poppler-form.h:678
time_t signingTime() const
The signing time associated with the signature.
SignatureStatus
The verification result of the signature.
Definition poppler-form.h:649
@ SignatureDigestMismatch
The document content was changed after the signature was applied.
Definition poppler-form.h:652
@ SignatureGenericError
The signature could not be verified.
Definition poppler-form.h:654
@ SignatureDecodingError
The signature CMS/PKCS7 structure is malformed.
Definition poppler-form.h:653
@ SignatureValid
The signature is cryptographically valid.
Definition poppler-form.h:650
@ SignatureNotFound
The requested signature is not present in the document.
Definition poppler-form.h:655
@ SignatureInvalid
The signature is cryptographically invalid.
Definition poppler-form.h:651
SignatureStatus signatureStatus() const
The signature status of the signature.
~SignatureValidationInfo()
*/
QString signerSubjectDN() const
The signer subject distinguished name associated with the signature.
QString reason() const
Get signing reason.
CertificateStatus certificateStatus() const
The certificate status of the signature.
QString location() const
Get signing location.
The Poppler Qt6 binding.
Definition poppler-annotation.h:51
bool POPPLER_QT6_DEPRECATED POPPLER_QT6_EXPORT hasNSSSupport()
Returns is poppler was compiled with NSS support.
std::optional< CryptoSignBackend > POPPLER_QT6_EXPORT activeCryptoSignBackend()
Returns current active backend or nullopt if none is active.
QVector< CertificateInfo > POPPLER_QT6_EXPORT getAvailableSigningCertificates()
Return vector of suitable signing certificates.
QVector< CryptoSignBackend > POPPLER_QT6_EXPORT availableCryptoSignBackends()
The available compiled-in backends.
QString POPPLER_QT6_EXPORT getNSSDir()
Gets the current NSS CertDB directory.
Q_DECLARE_OPERATORS_FOR_FLAGS(CertificateInfo::KeyUsageExtensions) class SignatureValidationInfoPrivate
A signature validation info helper class.
CryptoSignBackend
Possible compiled in backends for signature handling.
Definition poppler-form.h:917
CryptoSignBackendFeature
Definition poppler-form.h:948
@ BackendAsksPassphrase
If the backend itself out of band requests passwords or if the host applicaion somehow must do it.
void POPPLER_QT6_EXPORT setNSSDir(const QString &pathURL)
Set a custom NSS CertDB directory.
bool POPPLER_QT6_EXPORT setActiveCryptoSignBackend(CryptoSignBackend backend)
Sets active backend.
void POPPLER_QT6_EXPORT setNSSPasswordCallback(const std::function< char *(const char *)> &f)
Sets the callback for NSS password requests.
bool POPPLER_QT6_EXPORT hasCryptoSignBackendFeature(CryptoSignBackend, CryptoSignBackendFeature)
Queries if a backend supports or not supports a given feature.