Poppler Qt5 26.09.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, 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_QT5_FORM_H_
35#define _POPPLER_QT5_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-qt5.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
72
73class POPPLER_QT5_EXPORT FormFieldIcon
74{
75
76 friend class FormFieldIconData;
77
78public:
79 explicit FormFieldIcon(FormFieldIconData *data);
80 FormFieldIcon(const FormFieldIcon &ffIcon);
81 ~FormFieldIcon();
82
83 FormFieldIcon &operator=(const FormFieldIcon &ffIcon);
84
85private:
86 FormFieldIconData *d_ptr;
87};
88
93class POPPLER_QT5_EXPORT FormField
94{
95
96 friend class FormFieldData;
97
98public:
109
110 virtual ~FormField();
111
115 virtual FormType type() const = 0;
116
121 QRectF rect() const;
122
126 int id() const;
127
131 QString name() const;
132
137 void setName(const QString &name) const;
138
143 QString fullyQualifiedName() const;
144
149 QString uiName() const;
150
154 bool isReadOnly() const;
155
160 void setReadOnly(bool value);
161
165 bool isVisible() const;
166
171 void setVisible(bool value);
172
177 bool isPrintable() const;
178
183 void setPrintable(bool value);
184
191
204
210
217
218protected:
220 explicit FormField(std::unique_ptr<FormFieldData> dd);
221
222 std::unique_ptr<FormFieldData> m_formData;
224
225private:
226 Q_DISABLE_COPY(FormField)
227};
228
234class POPPLER_QT5_EXPORT FormFieldButton : public FormField
235{
236public:
246
248 FormFieldButton(DocumentData *doc, ::Page *p, ::FormWidgetButton *w);
250 ~FormFieldButton() override;
251
252 FormType type() const override;
253
258
262 QString caption() const;
263
270
278
282 bool state() const;
283
287 void setState(bool state);
288
295 QList<int> siblings() const;
296
297private:
298 Q_DISABLE_COPY(FormFieldButton)
299};
300
306class POPPLER_QT5_EXPORT FormFieldText : public FormField
307{
308public:
318
320 FormFieldText(DocumentData *doc, ::Page *p, ::FormWidgetText *w);
322 ~FormFieldText() override;
323
324 FormType type() const override;
325
330
334 QString text() const;
335
340 void setText(const QString &text);
341
347 void setAppearanceText(const QString &text);
348
355 bool isPassword() const;
356
360 bool isRichText() const;
361
365 int maximumLength() const;
366
370 Qt::Alignment textAlignment() const;
371
376 bool canBeSpellChecked() const;
377
381 double getFontSize() const;
382
386 void setFontSize(int fontSize);
387
388private:
389 Q_DISABLE_COPY(FormFieldText)
390};
391
397class POPPLER_QT5_EXPORT FormFieldChoice : public FormField
398{
399public:
408
410 FormFieldChoice(DocumentData *doc, ::Page *p, ::FormWidgetChoice *w);
412 ~FormFieldChoice() override;
413
414 FormType type() const override;
415
420
424 QStringList choices() const;
425
432 QVector<QPair<QString, QString>> choicesWithExportValues() const;
433
440 bool isEditable() const;
441
448 bool multiSelect() const;
449
453 QList<int> currentChoices() const;
454
458 void setCurrentChoices(const QList<int> &choice);
459
465 QString editChoice() const;
466
472 void setEditChoice(const QString &text);
473
477 Qt::Alignment textAlignment() const;
478
485 bool canBeSpellChecked() const;
486
493 void setAppearanceChoiceText(const QString &text);
494
495private:
496 Q_DISABLE_COPY(FormFieldChoice)
497};
498
504class CertificateInfoPrivate;
505class POPPLER_QT5_EXPORT CertificateInfo
506{
507public:
512 {
513 RsaKey,
514 DsaKey,
515 EcKey,
516 OtherKey
517 };
518
523 {
524 KuDigitalSignature = 0x80,
525 KuNonRepudiation = 0x40,
526 KuKeyEncipherment = 0x20,
527 KuDataEncipherment = 0x10,
528 KuKeyAgreement = 0x08,
529 KuKeyCertSign = 0x04,
530 KuClrSign = 0x02,
531 KuEncipherOnly = 0x01,
532 KuNone = 0x00
533 };
534 Q_DECLARE_FLAGS(KeyUsageExtensions, KeyUsageExtension)
535
536
542 {
543 X509,
544 PGP
545 };
546
551 {
552 CommonName,
553 DistinguishedName,
554 EmailAddress,
555 Organization,
556 };
557
568 enum class KeyLocation
569 {
570 Unknown,
571 Other,
572 Computer,
573 HardwareToken
574 };
575
577 explicit CertificateInfo(CertificateInfoPrivate *priv);
579
583 bool isNull() const;
584
588 int version() const;
589
593 QByteArray serialNumber() const;
594
598 QString issuerInfo(EntityInfoKey key) const;
599
603 QString subjectInfo(EntityInfoKey key) const;
604
610 QString nickName() const;
611
615 QDateTime validityStart() const;
616
620 QDateTime validityEnd() const;
621
625 KeyUsageExtensions keyUsageExtensions() const;
626
635 POPPLER_QT5_DEPRECATED QByteArray publicKey() const;
636
641
645 int publicKeyStrength() const;
646
650 bool isSelfSigned() const;
651
658
662 QByteArray certificateData() const;
663
669 bool checkPassword(const QString &password) const;
670
677
678 CertificateInfo(const CertificateInfo &other);
679 CertificateInfo &operator=(const CertificateInfo &other);
680
681private:
682 Q_DECLARE_PRIVATE(CertificateInfo)
683
684 QSharedPointer<CertificateInfoPrivate> d_ptr;
685};
686Q_DECLARE_OPERATORS_FOR_FLAGS(CertificateInfo::KeyUsageExtensions)
687
688
693class SignatureValidationInfoPrivate;
694class POPPLER_QT5_EXPORT SignatureValidationInfo
695{
696public:
710
725
731 {
732 HashAlgorithmUnknown,
733 HashAlgorithmMd2,
734 HashAlgorithmMd5,
735 HashAlgorithmSha1,
736 HashAlgorithmSha256,
737 HashAlgorithmSha384,
738 HashAlgorithmSha512,
739 HashAlgorithmSha224
740 };
741
743 explicit SignatureValidationInfo(SignatureValidationInfoPrivate *priv);
746
751
756
760 QString signerName() const;
761
766 QString signerSubjectDN() const;
767
772 QString location() const;
773
778 QString reason() const;
779
785
789 time_t signingTime() const;
790
795 QByteArray signature() const;
796
801 QList<qint64> signedRangeBounds() const;
802
808 bool signsTotalDocument() const;
809
815
816 SignatureValidationInfo(const SignatureValidationInfo &other);
817 SignatureValidationInfo &operator=(const SignatureValidationInfo &other);
818
819private:
820 Q_DECLARE_PRIVATE(SignatureValidationInfo)
821 friend class FormFieldSignature;
822 QSharedPointer<SignatureValidationInfoPrivate> d_ptr;
823};
824
830class AsyncObjectPrivate;
831class POPPLER_QT5_EXPORT AsyncObject : public QObject // clazy:exclude=ctor-missing-parent-argument
832{
833 Q_OBJECT
834public:
835 /* Constructor. On purpose not having a QObject parameter
836 It will be returned by shared_ptr or unique_ptr
837 */
838 AsyncObject();
839 ~AsyncObject() override;
840Q_SIGNALS:
841 void done();
842
843private:
844 std::unique_ptr<AsyncObjectPrivate> d;
845};
846
852class POPPLER_QT5_EXPORT FormFieldSignature : public FormField
853{
854public:
860 {
861 AdbePkcs7sha1,
862 AdbePkcs7detached,
863 EtsiCAdESdetached,
867 };
868
879
881 FormFieldSignature(DocumentData *doc, ::Page *p, ::FormWidgetSignature *w);
883 ~FormFieldSignature() override;
884
885 FormType type() const override;
886
892
906 POPPLER_QT5_DEPRECATED SignatureValidationInfo validate(ValidateOptions opt) const;
907
923 POPPLER_QT5_DEPRECATED SignatureValidationInfo validate(int opt, const QDateTime &validationTime) const;
924
942 std::pair<SignatureValidationInfo, std::shared_ptr<AsyncObject>> validateAsync(ValidateOptions opt, const QDateTime &validationTime = {}) const;
943
952
957 {
959 GenericSigningError,
960 SigningSuccess,
966
967 };
968
976 SigningResult sign(const QString &outputFileName, const PDFConverter::NewSignatureData &data) const;
977
984
985private:
986 Q_DISABLE_COPY(FormFieldSignature)
987};
988
995{
996 NSS,
997 GPG
998};
999
1005QVector<CryptoSignBackend> POPPLER_QT5_EXPORT availableCryptoSignBackends();
1006
1014std::optional<CryptoSignBackend> POPPLER_QT5_EXPORT activeCryptoSignBackend();
1015
1023bool POPPLER_QT5_EXPORT setActiveCryptoSignBackend(CryptoSignBackend backend);
1024
1031
1038
1046bool POPPLER_QT5_DEPRECATED POPPLER_QT5_EXPORT hasNSSSupport();
1047
1053QVector<CertificateInfo> POPPLER_QT5_EXPORT getAvailableSigningCertificates();
1054
1060QString POPPLER_QT5_EXPORT getNSSDir();
1061
1067void POPPLER_QT5_EXPORT setNSSDir(const QString &pathURL);
1068
1074void POPPLER_QT5_EXPORT setNSSPasswordCallback(const std::function<char *(const char *)> &f);
1075
1084void POPPLER_QT5_EXPORT setPgpSignaturesAllowed(bool allowed);
1085
1091bool POPPLER_QT5_EXPORT arePgpSignaturesAllowed();
1092}
1093
1094#endif
AdditionalActionType
Describes the flags from an annotations 'AA' dictionary.
Definition poppler-annotation.h:482
Definition poppler-form.h:506
POPPLER_QT5_DEPRECATED QByteArray publicKey() const
The raw public key value, though it might also be empty depending on the signature types involved.
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:542
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 isNull() const
Returns true if certificate has no contents; otherwise returns false.
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:523
PublicKeyType
The algorithm of public key.
Definition poppler-form.h:512
KeyUsageExtensions keyUsageExtensions() const
The uses allowed for the certificate.
QDateTime validityStart() const
The date-time when certificate becomes valid.
EntityInfoKey
Predefined keys for elements in an entity's distinguished name.
Definition poppler-form.h:551
KeyLocation
A signing key can be located in different places sometimes.
Definition poppler-form.h:569
QString nickName() const
The certificate internal database nickname.
A form field that represents a "button".
Definition poppler-form.h:235
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.
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:241
@ CheckBox
A check box.
Definition poppler-form.h:243
@ Radio
A radio button.
Definition poppler-form.h:244
@ Push
A simple push button.
Definition poppler-form.h:242
bool state() const
The state of the button.
A form field that represents a choice field.
Definition poppler-form.h:398
bool canBeSpellChecked() const
Whether the text inserted manually in the field (where possible) can be spell-checked.
ChoiceType
The particular type of this choice field.
Definition poppler-form.h:404
@ ListBox
A multiline text field.
Definition poppler-form.h:406
@ ComboBox
A simple singleline text field.
Definition poppler-form.h:405
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:74
A form field that represents a signature.
Definition poppler-form.h:853
std::pair< SignatureValidationInfo, std::shared_ptr< AsyncObject > > validateAsync(ValidateOptions opt, const QDateTime &validationTime={}) const
Validate the signature with validationTime as validation time.
POPPLER_QT5_DEPRECATED SignatureValidationInfo validate(int 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.
POPPLER_QT5_DEPRECATED SignatureValidationInfo validate(ValidateOptions opt) const
Validate the signature with now as validation time.
SignatureType
The types of signature fields.
Definition poppler-form.h:860
@ UnknownSignatureType
Definition poppler-form.h:864
@ G10cPgpSignatureDetached
non standard signature type
Definition poppler-form.h:866
@ UnsignedSignature
Definition poppler-form.h:865
SigningResult
Definition poppler-form.h:957
@ WriteFailed
Write failed (permissions, faulty disk, ...).
Definition poppler-form.h:963
@ InternalError
Unexpected error, likely a bug in poppler.
Definition poppler-form.h:961
@ KeyMissing
Key not found (Either the input key is not from the list or the available keys has changed underneath...
Definition poppler-form.h:962
@ FieldAlreadySigned
Trying to sign a field that is already signed.
Definition poppler-form.h:958
@ BadPassphrase
User entered bad passphrase.
Definition poppler-form.h:965
@ UserCancelled
User cancelled the process.
Definition poppler-form.h:964
ValidateOptions
The validation options of this signature.
Definition poppler-form.h:873
@ ValidateWithoutOCSPRevocationCheck
Do not contact OCSP servers to check for certificate revocation status.
Definition poppler-form.h:876
@ ValidateUseAIACertFetch
Use the AIA extension for certificate fetching.
Definition poppler-form.h:877
@ ValidateForceRevalidation
Force revalidation of the certificate.
Definition poppler-form.h:875
@ ValidateVerifyCertificate
Validate the certificate.
Definition poppler-form.h:874
ErrorString lastSigningErrorDetails() const
A string with a string that might offer more details of the signing result failure.
SignatureValidationInfo::CertificateStatus validateResult() const
A form field that represents a text input.
Definition poppler-form.h:307
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:313
@ Multiline
A multiline text field.
Definition poppler-form.h:315
@ Normal
A simple singleline text field.
Definition poppler-form.h:314
@ FileSelect
An input field to select the path of a file on disk.
Definition poppler-form.h:316
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).
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:94
bool isPrintable() const
Whether this field is printable.
Link * activationAction() const
The activation action of this form field.
Link * additionalAction(Annotation::AdditionalActionType type) const
Returns a given widget annotation additional action.
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.
void setReadOnly(bool value)
Set whether this form field is read-only.
void setPrintable(bool value)
Set whether this field is printable.
QRectF rect() const
Link * additionalAction(AdditionalActionType type) const
Returns a given form additional action.
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:198
@ CalculateField
A JavaScript action to be performed when the field needs to be recalculated.
Definition poppler-form.h:202
@ FormatField
A JavaScript action to be performed before the field is formatted to display its value.
Definition poppler-form.h:200
@ ValidateField
A JavaScript action to be performed when the field value changes.
Definition poppler-form.h:201
@ FieldModified
A JavaScript action to be performed when the user modifies the field.
Definition poppler-form.h:199
FormType
The different types of form field.
Definition poppler-form.h:103
@ FormButton
A button field. See ButtonType.
Definition poppler-form.h:104
@ FormSignature
A signature field.
Definition poppler-form.h:107
@ FormText
A text field. See TextType.
Definition poppler-form.h:105
@ FormChoice
A single choice field. See ChoiceType.
Definition poppler-form.h:106
Holds data for a new signature.
Definition poppler-qt5.h:2270
A page in a document.
Definition poppler-qt5.h:462
Definition poppler-form.h:695
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:715
@ CertificateVerificationInProgress
The certificate is not yet verified but is in progress in the background. See validateAsync.
Definition poppler-form.h:723
@ CertificateUntrustedIssuer
The issuer of this certificate has been marked as untrusted by the user.
Definition poppler-form.h:717
@ CertificateUnknownIssuer
The certificate trust chain has not finished in a trusted root certificate.
Definition poppler-form.h:718
@ CertificateGenericError
The certificate could not be verified.
Definition poppler-form.h:721
@ CertificateRevoked
The certificate was revoked by the issuing certificate authority.
Definition poppler-form.h:719
@ CertificateTrusted
The certificate is considered trusted.
Definition poppler-form.h:716
@ CertificateNotVerified
The certificate is not yet verified.
Definition poppler-form.h:722
@ CertificateExpired
The signing time is outside the validity bounds of this certificate.
Definition poppler-form.h:720
HashAlgorithm
The hash algorithm of the signature.
Definition poppler-form.h:731
time_t signingTime() const
The signing time associated with the signature.
SignatureStatus
The verification result of the signature.
Definition poppler-form.h:701
@ SignatureNotVerified
The signature is not yet verified.
Definition poppler-form.h:708
@ SignatureDigestMismatch
The document content was changed after the signature was applied.
Definition poppler-form.h:704
@ SignatureGenericError
The signature could not be verified.
Definition poppler-form.h:706
@ SignatureDecodingError
The signature CMS/PKCS7 structure is malformed.
Definition poppler-form.h:705
@ SignatureValid
The signature is cryptographically valid.
Definition poppler-form.h:702
@ SignatureNotFound
The requested signature is not present in the document.
Definition poppler-form.h:707
@ SignatureInvalid
The signature is cryptographically invalid.
Definition poppler-form.h:703
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 Qt5 binding.
Definition poppler-annotation.h:51
QVector< CertificateInfo > getAvailableSigningCertificates()
Return vector of suitable signing certificates.
bool hasCryptoSignBackendFeature(CryptoSignBackend backend, CryptoSignBackendFeature feature)
Queries if a backend supports or not supports a given feature.
bool arePgpSignaturesAllowed()
void setPgpSignaturesAllowed(bool allowed)
Allow pgp signatures in pdf files (standard-extension, experimental) Not supported for NSS backend.
QString getNSSDir()
Gets the current NSS CertDB directory.
std::optional< CryptoSignBackend > activeCryptoSignBackend()
Returns current active backend or nullopt if none is active.
void setNSSPasswordCallback(const std::function< char *(const char *)> &f)
Sets the callback for NSS password requests.
bool setActiveCryptoSignBackend(CryptoSignBackend backend)
Sets active backend.
bool POPPLER_QT5_DEPRECATED hasNSSSupport()
Returns is poppler was compiled with NSS support.
void setNSSDir(const QString &pathURL)
Set a custom NSS CertDB directory.
CryptoSignBackend
Possible compiled in backends for signature handling.
Definition poppler-form.h:995
CryptoSignBackendFeature
Definition poppler-form.h:1026
@ BackendAsksPassphrase
If the backend itself out of band requests passwords or if the host applicaion somehow must do it.
Definition poppler-form.h:1029
QVector< CryptoSignBackend > availableCryptoSignBackends()
The available compiled-in backends.
Combination of an error data and type of error string.
Definition poppler-qt5.h:135