Poppler Qt6 25.03.90
poppler-form.h
1/* poppler-form.h: qt interface to poppler
2 * Copyright (C) 2007-2008, Pino Toscano <pino@kde.org>
3 * Copyright (C) 2008, 2011, 2016, 2017, 2019-2022, Albert Astals Cid <aacid@kde.org>
4 * Copyright (C) 2012, Adam Reichold <adamreichold@myopera.com>
5 * Copyright (C) 2016, Hanno Meyer-Thurow <h.mth@web.de>
6 * Copyright (C) 2017, Hans-Ulrich Jüttner <huj@froreich-bioscientia.de>
7 * Copyright (C) 2017, Tobias C. Berner <tcberner@freebsd.org>
8 * Copyright (C) 2018, Andre Heinecke <aheinecke@intevation.de>
9 * Copyright (C) 2018, Chinmoy Ranjan Pradhan <chinmoyrp65@protonmail.com>
10 * Copyright (C) 2018, 2021 Oliver Sander <oliver.sander@tu-dresden.de>
11 * Copyright (C) 2019 João Netto <joaonetto901@gmail.com>
12 * Copyright (C) 2019, Adrian Johnson <ajohnson@redneon.com>
13 * Copyright (C) 2020, Thorsten Behrens <Thorsten.Behrens@CIB.de>
14 * Copyright (C) 2020, Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by Technische Universität Dresden
15 * Copyright (C) 2021, Theofilos Intzoglou <int.teo@gmail.com>
16 * Copyright (C) 2023-2025, g10 Code GmbH, Author: Sune Stolborg Vuorela <sune@vuorela.dk>
17 * Copyright (C) 2024, Pratham Gandhi <ppg.1382@gmail.com>
18 *
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation; either version 2, or (at your option)
22 * any later version.
23 *
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
28 *
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
32 */
33
34#ifndef _POPPLER_QT6_FORM_H_
35#define _POPPLER_QT6_FORM_H_
36
37#include <functional>
38#include <memory>
39#include <ctime>
40#include <optional>
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"
50
51class Object;
52class Page;
53class FormWidget;
54class FormWidgetButton;
55class FormWidgetText;
56class FormWidgetChoice;
57class FormWidgetSignature;
58
59namespace Poppler {
60
61class DocumentData;
62class Link;
63
64class FormFieldData;
65class FormFieldIconData;
66
71class POPPLER_QT6_EXPORT FormFieldIcon
72{
73
74 friend class FormFieldIconData;
75
76public:
77 explicit FormFieldIcon(FormFieldIconData *data);
78 FormFieldIcon(const FormFieldIcon &ffIcon);
80
81 FormFieldIcon &operator=(const FormFieldIcon &ffIcon);
82
83private:
84 FormFieldIconData *d_ptr;
85};
89class POPPLER_QT6_EXPORT FormField
90{
91
92 friend class FormFieldData;
93
94public:
99 {
103 FormSignature
104 };
105
106 virtual ~FormField();
107
111 virtual FormType type() const = 0;
112
117 QRectF rect() const;
118
122 int id() const;
123
127 QString name() const;
128
132 void setName(const QString &name) const;
133
137 QString fullyQualifiedName() const;
138
143 QString uiName() const;
144
148 bool isReadOnly() const;
149
153 void setReadOnly(bool value);
154
158 bool isVisible() const;
159
163 void setVisible(bool value);
164
168 bool isPrintable() const;
169
173 void setPrintable(bool value);
174
180 std::unique_ptr<Link> activationAction() const;
181
195 std::unique_ptr<Link> additionalAction(AdditionalActionType type) const;
196
200 std::unique_ptr<Link> additionalAction(Annotation::AdditionalActionType type) const;
201
202protected:
204 explicit FormField(std::unique_ptr<FormFieldData> dd);
205
206 std::unique_ptr<FormFieldData> m_formData;
208
209private:
210 Q_DISABLE_COPY(FormField)
211};
212
216class POPPLER_QT6_EXPORT FormFieldButton : public FormField
217{
218public:
223 {
226 Radio
227 };
228
230 FormFieldButton(DocumentData *doc, ::Page *p, ::FormWidgetButton *w);
233
234 FormType type() const override;
235
240
244 QString caption() const;
245
250
255 void setIcon(const FormFieldIcon &icon);
256
260 bool state() const;
261
265 void setState(bool state);
266
273 QList<int> siblings() const;
274
275private:
276 Q_DISABLE_COPY(FormFieldButton)
277};
278
282class POPPLER_QT6_EXPORT FormFieldText : public FormField
283{
284public:
289 {
292 FileSelect
293 };
294
296 FormFieldText(DocumentData *doc, ::Page *p, ::FormWidgetText *w);
298 ~FormFieldText() override;
299
300 FormType type() const override;
301
306
310 QString text() const;
311
316 void setText(const QString &text);
317
322 void setAppearanceText(const QString &text);
323
330 bool isPassword() const;
331
335 bool isRichText() const;
336
340 int maximumLength() const;
341
345 Qt::Alignment textAlignment() const;
346
351 bool canBeSpellChecked() const;
352
356 double getFontSize() const;
357
361 void setFontSize(int fontSize);
362
363private:
364 Q_DISABLE_COPY(FormFieldText)
365};
366
370class POPPLER_QT6_EXPORT FormFieldChoice : public FormField
371{
372public:
377 {
379 ListBox
380 };
381
383 FormFieldChoice(DocumentData *doc, ::Page *p, ::FormWidgetChoice *w);
386
387 FormType type() const override;
388
393
397 QStringList choices() const;
398
404 QVector<QPair<QString, QString>> choicesWithExportValues() const;
405
412 bool isEditable() const;
413
420 bool multiSelect() const;
421
425 QList<int> currentChoices() const;
426
430 void setCurrentChoices(const QList<int> &choice);
431
435 QString editChoice() const;
436
440 void setEditChoice(const QString &text);
441
445 Qt::Alignment textAlignment() const;
446
453 bool canBeSpellChecked() const;
454
461 void setAppearanceChoiceText(const QString &text);
462
463private:
464 Q_DISABLE_COPY(FormFieldChoice)
465};
466
470class CertificateInfoPrivate;
471class POPPLER_QT6_EXPORT CertificateInfo
472{
473public:
478 {
479 RsaKey,
480 DsaKey,
481 EcKey,
482 OtherKey
483 };
484
489 {
490 KuDigitalSignature = 0x80,
491 KuNonRepudiation = 0x40,
492 KuKeyEncipherment = 0x20,
493 KuDataEncipherment = 0x10,
494 KuKeyAgreement = 0x08,
495 KuKeyCertSign = 0x04,
496 KuClrSign = 0x02,
497 KuEncipherOnly = 0x01,
498 KuNone = 0x00
499 };
501
502
505 enum EntityInfoKey
506 {
507 CommonName,
508 DistinguishedName,
509 EmailAddress,
510 Organization,
511 };
512
519 {
520 X509,
521 PGP
522 };
523
534 enum class KeyLocation
535 {
536 Unknown,
537 Other,
538 Computer,
539 HardwareToken
540 };
541
543 explicit CertificateInfo(CertificateInfoPrivate *priv);
545
549 bool isNull() const;
550
554 int version() const;
555
559 QByteArray serialNumber() const;
560
564 QString issuerInfo(EntityInfoKey key) const;
565
569 QString subjectInfo(EntityInfoKey key) const;
570
576 QString nickName() const;
577
581 QDateTime validityStart() const;
582
586 QDateTime validityEnd() const;
587
591 KeyUsageExtensions keyUsageExtensions() const;
592
596 QByteArray publicKey() const;
597
602
606 int publicKeyStrength() const;
607
611 bool isSelfSigned() const;
612
618 bool isQualified() const;
619
626
630 QByteArray certificateData() const;
631
637 bool checkPassword(const QString &password) const;
638
645
646 CertificateInfo(const CertificateInfo &other);
647 CertificateInfo &operator=(const CertificateInfo &other);
648
649private:
650 Q_DECLARE_PRIVATE(CertificateInfo)
651
652 QSharedPointer<CertificateInfoPrivate> d_ptr;
653};
654Q_DECLARE_OPERATORS_FOR_FLAGS(CertificateInfo::KeyUsageExtensions)
655
656
659class SignatureValidationInfoPrivate;
660class POPPLER_QT6_EXPORT SignatureValidationInfo
661{
662public:
676
691
696 {
697 HashAlgorithmUnknown,
698 HashAlgorithmMd2,
699 HashAlgorithmMd5,
700 HashAlgorithmSha1,
701 HashAlgorithmSha256,
702 HashAlgorithmSha384,
703 HashAlgorithmSha512,
704 HashAlgorithmSha224
705 };
706
708 explicit SignatureValidationInfo(SignatureValidationInfoPrivate *priv);
711
716
721
725 QString signerName() const;
726
730 QString signerSubjectDN() const;
731
735 QString location() const;
736
740 QString reason() const;
741
746
750 time_t signingTime() const;
751
755 QByteArray signature() const;
756
760 QList<qint64> signedRangeBounds() const;
761
766 bool signsTotalDocument() const;
767
772
774 SignatureValidationInfo &operator=(const SignatureValidationInfo &other);
775
776private:
777 Q_DECLARE_PRIVATE(SignatureValidationInfo)
778 friend class FormFieldSignature;
779 QSharedPointer<SignatureValidationInfoPrivate> d_ptr;
780};
781
787class AsyncObjectPrivate;
788class POPPLER_QT6_EXPORT AsyncObject : public QObject // clazy:exclude=ctor-missing-parent-argument
789{
790 Q_OBJECT
791public:
792 /* Constructor. On purpose not having a QObject parameter
793 It will be returned by shared_ptr or unique_ptr
794 */
795 AsyncObject();
796 ~AsyncObject() override;
797Q_SIGNALS:
798 void done();
799
800private:
801 std::unique_ptr<AsyncObjectPrivate> d;
802};
803
807class POPPLER_QT6_EXPORT FormFieldSignature : public FormField
808{
809public:
814 {
815 UnknownSignatureType,
816 AdbePkcs7sha1,
817 AdbePkcs7detached,
818 EtsiCAdESdetached,
821 };
822
827 {
828 ValidateVerifyCertificate = 1,
829 ValidateForceRevalidation = 2,
830 ValidateWithoutOCSPRevocationCheck = 4,
831 ValidateUseAIACertFetch = 8
832 };
833
835 FormFieldSignature(DocumentData *doc, ::Page *p, ::FormWidgetSignature *w);
838
839 FormType type() const override;
840
845
859 POPPLER_QT6_DEPRECATED SignatureValidationInfo validate(ValidateOptions opt) const;
860
874 POPPLER_QT6_DEPRECATED SignatureValidationInfo validate(int opt, const QDateTime &validationTime) const;
875
893 std::pair<SignatureValidationInfo, std::shared_ptr<AsyncObject>> validateAsync(ValidateOptions opt, const QDateTime &validationTime = {}) const;
894
903
921
929 SigningResult sign(const QString &outputFileName, const PDFConverter::NewSignatureData &data) const;
930
931private:
932 Q_DISABLE_COPY(FormFieldSignature)
933};
940{
941 NSS,
942 GPG
943};
944
950QVector<CryptoSignBackend> POPPLER_QT6_EXPORT availableCryptoSignBackends();
951
959std::optional<CryptoSignBackend> POPPLER_QT6_EXPORT activeCryptoSignBackend();
960
968bool POPPLER_QT6_EXPORT setActiveCryptoSignBackend(CryptoSignBackend backend);
969
976
983
991bool POPPLER_QT6_DEPRECATED POPPLER_QT6_EXPORT hasNSSSupport();
992
998QVector<CertificateInfo> POPPLER_QT6_EXPORT getAvailableSigningCertificates();
999
1005QString POPPLER_QT6_EXPORT getNSSDir();
1006
1012void POPPLER_QT6_EXPORT setNSSDir(const QString &pathURL);
1013
1019void POPPLER_QT6_EXPORT setNSSPasswordCallback(const std::function<char *(const char *)> &f);
1020
1029void POPPLER_QT6_EXPORT setPgpSignaturesAllowed(bool allowed);
1030
1036bool POPPLER_QT6_EXPORT arePgpSignaturesAllowed();
1037}
1038
1039#endif
AdditionalActionType
Describes the flags from an annotations 'AA' dictionary.
Definition poppler-annotation.h:438
Definition poppler-form.h:789
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.
CertificateType certificateType() const
QString subjectInfo(EntityInfoKey key) const
Information about the subject.
CertificateType
The type of the certificate.
Definition poppler-form.h:519
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:535
QString nickName() const
The certificate internal database nickname.
A form field that represents a "button".
Definition poppler-form.h:217
ButtonType buttonType() const
The particular type of the button field.
QString caption() const
The caption to be used for the button.
void setIcon(const FormFieldIcon &icon)
Sets a new icon for the button, it has to be a icon returned by FormFieldButton::icon.
QList< int > siblings() const
The list with the IDs of siblings (ie, buttons belonging to the same group as the current one.
~FormFieldButton() override
*‍/
FormType type() const override
The type of the field.
void setState(bool state)
Sets the state of the button to the new state .
FormFieldIcon icon() const
Gets the icon used by the button.
ButtonType
The types of button field.
Definition poppler-form.h:223
@ CheckBox
A check box.
Definition poppler-form.h:225
@ Push
A simple push button.
Definition poppler-form.h:224
bool state() const
The state of the button.
A form field that represents a choice field.
Definition poppler-form.h:371
bool canBeSpellChecked() const
Whether the text inserted manually in the field (where possible) can be spell-checked.
~FormFieldChoice() override
*‍/
ChoiceType
The particular type of this choice field.
Definition poppler-form.h:377
@ ComboBox
A simple singleline text field.
Definition poppler-form.h:378
QVector< QPair< QString, QString > > choicesWithExportValues() const
The possible choices of the choice field.
ChoiceType choiceType() const
The choice type of the choice field.
bool multiSelect() const
Whether more than one choice of this FormFieldChoice::ListBox can be selected at the same time.
QList< int > currentChoices() const
The currently selected choices.
void setEditChoice(const QString &text)
Sets the text entered into an editable combo box choice field.
QString editChoice() const
The text entered into an editable combo box choice field.
void setCurrentChoices(const QList< int > &choice)
Sets the selected choices to choice.
void setAppearanceChoiceText(const QString &text)
Sets the text inside the Appearance Stream to the specified text.
Qt::Alignment textAlignment() const
The horizontal alignment for the text of this text field.
FormType type() const override
The type of the field.
QStringList choices() const
The possible choices of the choice field.
bool isEditable() const
Whether this FormFieldChoice::ComboBox is editable, i.e.
The class containing the appearance information.
Definition poppler-form.h:72
A form field that represents a signature.
Definition poppler-form.h:808
std::pair< SignatureValidationInfo, std::shared_ptr< AsyncObject > > validateAsync(ValidateOptions opt, const QDateTime &validationTime={}) const
Validate the signature with validationTime as validation time.
SigningResult sign(const QString &outputFileName, const PDFConverter::NewSignatureData &data) const
Signs a field of UnsignedSignature type.
FormType type() const override
The type of the field.
SignatureType signatureType() const
The signature type.
SignatureType
The types of signature fields.
Definition poppler-form.h:814
@ G10cPgpSignatureDetached
nonstandardized signature type
Definition poppler-form.h:820
@ UnsignedSignature
Definition poppler-form.h:819
POPPLER_QT6_DEPRECATED SignatureValidationInfo validate(int opt, const QDateTime &validationTime) const
Validate the signature with validationTime as validation time.
SigningResult
For consumers, this enum will be extended.
Definition poppler-form.h:911
@ WriteFailed
Write failed (permissions, faulty disk, ...)
Definition poppler-form.h:917
@ InternalError
Unexpected error, likely a bug in poppler.
Definition poppler-form.h:915
@ KeyMissing
Key not found (Either the input key is not from the list or the available keys has changed underneath...
Definition poppler-form.h:916
@ FieldAlreadySigned
Trying to sign a field that is already signed.
Definition poppler-form.h:912
@ SigningSuccess
No error.
Definition poppler-form.h:914
@ BadPassphrase
Passphrase didn't work.
Definition poppler-form.h:919
@ GenericSigningError
Unclassified error.
Definition poppler-form.h:913
@ UserCancelled
User cancelled the process.
Definition poppler-form.h:918
ValidateOptions
The validation options of this signature.
Definition poppler-form.h:827
~FormFieldSignature() override
*‍/
POPPLER_QT6_DEPRECATED SignatureValidationInfo validate(ValidateOptions opt) const
Validate the signature with now as validation time.
SignatureValidationInfo::CertificateStatus validateResult() const
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.
The base class representing a form field.
Definition poppler-form.h:90
bool isPrintable() const
Whether this field is printable.
std::unique_ptr< Link > activationAction() const
The activation action of this form field.
int id() const
The ID of the field.
QString name() const
The internal name (T) of the field.
void setVisible(bool value)
Set whether this form field is visible.
bool isVisible() const
Whether this form field is visible.
std::unique_ptr< Link > additionalAction(AdditionalActionType type) const
Returns a given form additional action.
void setReadOnly(bool value)
Set whether this form field is read-only.
void setPrintable(bool value)
Set whether this field is printable.
std::unique_ptr< Link > additionalAction(Annotation::AdditionalActionType type) const
Returns a given widget annotation additional action.
QRectF rect() const
bool isReadOnly() const
Whether this form field is read-only.
QString fullyQualifiedName() const
The internal fully qualified name of the field.
QString uiName() const
The name of the field to be used in user interface (eg messages to the user).
void setName(const QString &name) const
Sets the internal name (T) of the field.
virtual FormType type() const =0
The type of the field.
AdditionalActionType
Describes the flags from the form 'AA' dictionary.
Definition poppler-form.h:186
@ CalculateField
A JavaScript action to be performed when the field needs to be recalculated.
Definition poppler-form.h:190
@ FormatField
A JavaScript action to be performed before the field is formatted to display its value.
Definition poppler-form.h:188
@ ValidateField
A JavaScript action to be performed when the field value changes.
Definition poppler-form.h:189
@ FieldModified
A JavaScript action to be performed when the user modifies the field.
Definition poppler-form.h:187
FormType
The different types of form field.
Definition poppler-form.h:99
@ FormButton
A button field. See ButtonType.
Definition poppler-form.h:100
@ FormText
A text field. See TextType.
Definition poppler-form.h:101
@ FormChoice
A single choice field. See ChoiceType.
Definition poppler-form.h:102
Definition poppler-form.h:661
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:681
@ CertificateUntrustedIssuer
The issuer of this certificate has been marked as untrusted by the user.
Definition poppler-form.h:683
@ CertificateUnknownIssuer
The certificate trust chain has not finished in a trusted root certificate.
Definition poppler-form.h:684
@ CertificateGenericError
The certificate could not be verified.
Definition poppler-form.h:687
@ CertificateRevoked
The certificate was revoked by the issuing certificate authority.
Definition poppler-form.h:685
@ CertificateTrusted
The certificate is considered trusted.
Definition poppler-form.h:682
@ CertificateNotVerified
The certificate is not yet verified.
Definition poppler-form.h:688
@ CertificateExpired
The signing time is outside the validity bounds of this certificate.
Definition poppler-form.h:686
HashAlgorithm
The hash algorithm of the signature.
Definition poppler-form.h:696
time_t signingTime() const
The signing time associated with the signature.
SignatureStatus
The verification result of the signature.
Definition poppler-form.h:667
@ SignatureDigestMismatch
The document content was changed after the signature was applied.
Definition poppler-form.h:670
@ SignatureGenericError
The signature could not be verified.
Definition poppler-form.h:672
@ SignatureDecodingError
The signature CMS/PKCS7 structure is malformed.
Definition poppler-form.h:671
@ SignatureValid
The signature is cryptographically valid.
Definition poppler-form.h:668
@ SignatureNotFound
The requested signature is not present in the document.
Definition poppler-form.h:673
@ SignatureInvalid
The signature is cryptographically invalid.
Definition poppler-form.h:669
SignatureStatus signatureStatus() const
The signature status of the signature.
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.
bool POPPLER_QT6_EXPORT arePgpSignaturesAllowed()
void POPPLER_QT6_EXPORT setPgpSignaturesAllowed(bool allowed)
Allow pgp signatures in pdf files (standard-extension, experimental) Not supported for NSS backend.
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:940
CryptoSignBackendFeature
Definition poppler-form.h:971
@ 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.