Poppler Qt5 26.10.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-2026, g10 Code GmbH, Author: Sune Stolborg Vuorela <sune@vuorela.dk>
17 * Copyright (C) 2024, Pratham Gandhi <ppg.1382@gmail.com>
18 * Copyright (C) 2026 Sune Stolborg Vuorela <sune@vuorela.dk>, work sponsored by the Direction Interministérielle du Numérique
19 *
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2, or (at your option)
23 * any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
29 *
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
33 */
34
35#ifndef _POPPLER_QT5_FORM_H_
36#define _POPPLER_QT5_FORM_H_
37
38#include <functional>
39#include <memory>
40#include <ctime>
41#include <optional>
42#include <QtCore/QDateTime>
43#include <QtCore/QVector>
44#include <QtCore/QList>
45#include <QtCore/QRectF>
46#include <QtCore/QStringList>
47#include <QtCore/QSharedPointer>
48#include "poppler-export.h"
49#include "poppler-annotation.h"
50#include "poppler-qt5.h"
51
52class Object;
53class Page;
54class FormWidget;
55class FormWidgetButton;
56class FormWidgetText;
57class FormWidgetChoice;
58class FormWidgetSignature;
59
60namespace Poppler {
61
62class DocumentData;
63class Link;
64
65class FormFieldData;
66class FormFieldIconData;
67
73
74class POPPLER_QT5_EXPORT FormFieldIcon
75{
76
77 friend class FormFieldIconData;
78
79public:
80 explicit FormFieldIcon(FormFieldIconData *data);
81 FormFieldIcon(const FormFieldIcon &ffIcon);
82 ~FormFieldIcon();
83
84 FormFieldIcon &operator=(const FormFieldIcon &ffIcon);
85
86private:
87 FormFieldIconData *d_ptr;
88};
89
94class POPPLER_QT5_EXPORT FormField
95{
96
97 friend class FormFieldData;
98
99public:
110
111 virtual ~FormField();
112
116 virtual FormType type() const = 0;
117
122 QRectF rect() const;
123
127 int id() const;
128
132 QString name() const;
133
138 void setName(const QString &name) const;
139
144 QString fullyQualifiedName() const;
145
150 QString uiName() const;
151
155 bool isReadOnly() const;
156
161 void setReadOnly(bool value);
162
166 bool isVisible() const;
167
172 void setVisible(bool value);
173
178 bool isPrintable() const;
179
184 void setPrintable(bool value);
185
192
205
211
218
219protected:
221 explicit FormField(std::unique_ptr<FormFieldData> dd);
222
223 std::unique_ptr<FormFieldData> m_formData;
225
226private:
227 Q_DISABLE_COPY(FormField)
228};
229
235class POPPLER_QT5_EXPORT FormFieldButton : public FormField
236{
237public:
247
249 FormFieldButton(DocumentData *doc, ::Page *p, ::FormWidgetButton *w);
251 ~FormFieldButton() override;
252
253 FormType type() const override;
254
259
263 QString caption() const;
264
271
279
283 bool state() const;
284
288 void setState(bool state);
289
296 QList<int> siblings() const;
297
298private:
299 Q_DISABLE_COPY(FormFieldButton)
300};
301
307class POPPLER_QT5_EXPORT FormFieldText : public FormField
308{
309public:
319
321 FormFieldText(DocumentData *doc, ::Page *p, ::FormWidgetText *w);
323 ~FormFieldText() override;
324
325 FormType type() const override;
326
331
335 QString text() const;
336
341 void setText(const QString &text);
342
348 void setAppearanceText(const QString &text);
349
356 bool isPassword() const;
357
361 bool isRichText() const;
362
366 int maximumLength() const;
367
371 Qt::Alignment textAlignment() const;
372
377 bool canBeSpellChecked() const;
378
382 double getFontSize() const;
383
387 void setFontSize(int fontSize);
388
389private:
390 Q_DISABLE_COPY(FormFieldText)
391};
392
398class POPPLER_QT5_EXPORT FormFieldChoice : public FormField
399{
400public:
409
411 FormFieldChoice(DocumentData *doc, ::Page *p, ::FormWidgetChoice *w);
413 ~FormFieldChoice() override;
414
415 FormType type() const override;
416
421
425 QStringList choices() const;
426
433 QVector<QPair<QString, QString>> choicesWithExportValues() const;
434
441 bool isEditable() const;
442
449 bool multiSelect() const;
450
454 QList<int> currentChoices() const;
455
459 void setCurrentChoices(const QList<int> &choice);
460
466 QString editChoice() const;
467
473 void setEditChoice(const QString &text);
474
478 Qt::Alignment textAlignment() const;
479
486 bool canBeSpellChecked() const;
487
494 void setAppearanceChoiceText(const QString &text);
495
496private:
497 Q_DISABLE_COPY(FormFieldChoice)
498};
499
505class CertificateInfoPrivate;
506class POPPLER_QT5_EXPORT CertificateInfo
507{
508public:
513 {
514 RsaKey,
515 DsaKey,
516 EcKey,
517 OtherKey
518 };
519
524 {
525 KuDigitalSignature = 0x80,
526 KuNonRepudiation = 0x40,
527 KuKeyEncipherment = 0x20,
528 KuDataEncipherment = 0x10,
529 KuKeyAgreement = 0x08,
530 KuKeyCertSign = 0x04,
531 KuClrSign = 0x02,
532 KuEncipherOnly = 0x01,
533 KuNone = 0x00
534 };
535 Q_DECLARE_FLAGS(KeyUsageExtensions, KeyUsageExtension)
536
537
543 {
544 X509,
545 PGP
546 };
547
552 {
553 CommonName,
554 DistinguishedName,
555 EmailAddress,
556 Organization,
557 };
558
569 enum class KeyLocation
570 {
571 Unknown,
572 Other,
573 Computer,
574 HardwareToken
575 };
576
578 explicit CertificateInfo(CertificateInfoPrivate *priv);
580
584 bool isNull() const;
585
589 int version() const;
590
594 QByteArray serialNumber() const;
595
599 QString issuerInfo(EntityInfoKey key) const;
600
604 QString subjectInfo(EntityInfoKey key) const;
605
611 QString nickName() const;
612
616 QDateTime validityStart() const;
617
621 QDateTime validityEnd() const;
622
626 KeyUsageExtensions keyUsageExtensions() const;
627
636 POPPLER_QT5_DEPRECATED QByteArray publicKey() const;
637
642
646 int publicKeyStrength() const;
647
651 bool isSelfSigned() const;
652
659
663 QByteArray certificateData() const;
664
670 bool checkPassword(const QString &password) const;
671
678
679 CertificateInfo(const CertificateInfo &other);
680 CertificateInfo &operator=(const CertificateInfo &other);
681
682private:
683 Q_DECLARE_PRIVATE(CertificateInfo)
684
685 QSharedPointer<CertificateInfoPrivate> d_ptr;
686};
687Q_DECLARE_OPERATORS_FOR_FLAGS(CertificateInfo::KeyUsageExtensions)
688
689
694class SignatureValidationInfoPrivate;
695class POPPLER_QT5_EXPORT SignatureValidationInfo
696{
697public:
711
726
732 {
733 HashAlgorithmUnknown,
734 HashAlgorithmMd2,
735 HashAlgorithmMd5,
736 HashAlgorithmSha1,
737 HashAlgorithmSha256,
738 HashAlgorithmSha384,
739 HashAlgorithmSha512,
740 HashAlgorithmSha224
741 };
742
744 explicit SignatureValidationInfo(SignatureValidationInfoPrivate *priv);
747
752
757
761 QString signerName() const;
762
767 QString signerSubjectDN() const;
768
773 QString location() const;
774
779 QString reason() const;
780
786
790 time_t signingTime() const;
791
796 QByteArray signature() const;
797
802 QList<qint64> signedRangeBounds() const;
803
809 bool signsTotalDocument() const;
810
816
817 SignatureValidationInfo(const SignatureValidationInfo &other);
818 SignatureValidationInfo &operator=(const SignatureValidationInfo &other);
819
820private:
821 Q_DECLARE_PRIVATE(SignatureValidationInfo)
822 friend class FormFieldSignature;
823 QSharedPointer<SignatureValidationInfoPrivate> d_ptr;
824};
825
831class AsyncObjectPrivate;
832class POPPLER_QT5_EXPORT AsyncObject : public QObject // clazy:exclude=ctor-missing-parent-argument
833{
834 Q_OBJECT
835public:
836 /* Constructor. On purpose not having a QObject parameter
837 It will be returned by shared_ptr or unique_ptr
838 */
839 AsyncObject();
840 ~AsyncObject() override;
841Q_SIGNALS:
842 void done();
843
844private:
845 std::unique_ptr<AsyncObjectPrivate> d;
846};
847
853class POPPLER_QT5_EXPORT FormFieldSignature : public FormField
854{
855public:
861 {
862 AdbePkcs7sha1,
863 AdbePkcs7detached,
864 EtsiCAdESdetached,
868 };
869
880
882 FormFieldSignature(DocumentData *doc, ::Page *p, ::FormWidgetSignature *w);
884 ~FormFieldSignature() override;
885
886 FormType type() const override;
887
893
907 POPPLER_QT5_DEPRECATED SignatureValidationInfo validate(ValidateOptions opt) const;
908
924 POPPLER_QT5_DEPRECATED SignatureValidationInfo validate(int opt, const QDateTime &validationTime) const;
925
943 std::pair<SignatureValidationInfo, std::shared_ptr<AsyncObject>> validateAsync(ValidateOptions opt, const QDateTime &validationTime = {}) const;
944
953
969
977 SigningResult sign(const QString &outputFileName, const PDFConverter::NewSignatureData &data) const;
978
985
986private:
987 Q_DISABLE_COPY(FormFieldSignature)
988};
989
996{
997 NSS,
998 GPG
999};
1000
1006QVector<CryptoSignBackend> POPPLER_QT5_EXPORT availableCryptoSignBackends();
1007
1015std::optional<CryptoSignBackend> POPPLER_QT5_EXPORT activeCryptoSignBackend();
1016
1024bool POPPLER_QT5_EXPORT setActiveCryptoSignBackend(CryptoSignBackend backend);
1025
1032
1039
1047bool POPPLER_QT5_DEPRECATED POPPLER_QT5_EXPORT hasNSSSupport();
1048
1054QVector<CertificateInfo> POPPLER_QT5_EXPORT getAvailableSigningCertificates();
1055
1061QString POPPLER_QT5_EXPORT getNSSDir();
1062
1068void POPPLER_QT5_EXPORT setNSSDir(const QString &pathURL);
1069
1075void POPPLER_QT5_EXPORT setNSSPasswordCallback(const std::function<char *(const char *)> &f);
1076
1085void POPPLER_QT5_EXPORT setPgpSignaturesAllowed(bool allowed);
1086
1092bool POPPLER_QT5_EXPORT arePgpSignaturesAllowed();
1093}
1094
1095#endif
AdditionalActionType
Describes the flags from an annotations 'AA' dictionary.
Definition poppler-annotation.h:482
Definition poppler-form.h:507
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:543
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:524
PublicKeyType
The algorithm of public key.
Definition poppler-form.h:513
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:552
KeyLocation
A signing key can be located in different places sometimes.
Definition poppler-form.h:570
QString nickName() const
The certificate internal database nickname.
A form field that represents a "button".
Definition poppler-form.h:236
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:242
@ CheckBox
A check box.
Definition poppler-form.h:244
@ Radio
A radio button.
Definition poppler-form.h:245
@ Push
A simple push button.
Definition poppler-form.h:243
bool state() const
The state of the button.
A form field that represents a choice field.
Definition poppler-form.h:399
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:405
@ ListBox
A multiline text field.
Definition poppler-form.h:407
@ ComboBox
A simple singleline text field.
Definition poppler-form.h:406
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:75
A form field that represents a signature.
Definition poppler-form.h:854
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:861
@ UnknownSignatureType
Definition poppler-form.h:865
@ G10cPgpSignatureDetached
non standard signature type
Definition poppler-form.h:867
@ UnsignedSignature
Definition poppler-form.h:866
SigningResult
Definition poppler-form.h:958
@ WriteFailed
Write failed (permissions, faulty disk, ...).
Definition poppler-form.h:964
@ InternalError
Unexpected error, likely a bug in poppler.
Definition poppler-form.h:962
@ KeyMissing
Key not found (Either the input key is not from the list or the available keys has changed underneath...
Definition poppler-form.h:963
@ FieldAlreadySigned
Trying to sign a field that is already signed.
Definition poppler-form.h:959
@ BadPassphrase
User entered bad passphrase.
Definition poppler-form.h:966
@ UnsupportedSignatureType
User asked for a signature type that the current backend/key combo can't deliver.
Definition poppler-form.h:967
@ UserCancelled
User cancelled the process.
Definition poppler-form.h:965
ValidateOptions
The validation options of this signature.
Definition poppler-form.h:874
@ ValidateWithoutOCSPRevocationCheck
Do not contact OCSP servers to check for certificate revocation status.
Definition poppler-form.h:877
@ ValidateUseAIACertFetch
Use the AIA extension for certificate fetching.
Definition poppler-form.h:878
@ ValidateForceRevalidation
Force revalidation of the certificate.
Definition poppler-form.h:876
@ ValidateVerifyCertificate
Validate the certificate.
Definition poppler-form.h:875
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:308
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:314
@ Multiline
A multiline text field.
Definition poppler-form.h:316
@ Normal
A simple singleline text field.
Definition poppler-form.h:315
@ FileSelect
An input field to select the path of a file on disk.
Definition poppler-form.h:317
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:95
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:199
@ CalculateField
A JavaScript action to be performed when the field needs to be recalculated.
Definition poppler-form.h:203
@ FormatField
A JavaScript action to be performed before the field is formatted to display its value.
Definition poppler-form.h:201
@ ValidateField
A JavaScript action to be performed when the field value changes.
Definition poppler-form.h:202
@ FieldModified
A JavaScript action to be performed when the user modifies the field.
Definition poppler-form.h:200
FormType
The different types of form field.
Definition poppler-form.h:104
@ FormButton
A button field. See ButtonType.
Definition poppler-form.h:105
@ FormSignature
A signature field.
Definition poppler-form.h:108
@ FormText
A text field. See TextType.
Definition poppler-form.h:106
@ FormChoice
A single choice field. See ChoiceType.
Definition poppler-form.h:107
Holds data for a new signature.
Definition poppler-qt5.h:2271
A page in a document.
Definition poppler-qt5.h:463
Definition poppler-form.h:696
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:716
@ CertificateVerificationInProgress
The certificate is not yet verified but is in progress in the background. See validateAsync.
Definition poppler-form.h:724
@ CertificateUntrustedIssuer
The issuer of this certificate has been marked as untrusted by the user.
Definition poppler-form.h:718
@ CertificateUnknownIssuer
The certificate trust chain has not finished in a trusted root certificate.
Definition poppler-form.h:719
@ CertificateGenericError
The certificate could not be verified.
Definition poppler-form.h:722
@ CertificateRevoked
The certificate was revoked by the issuing certificate authority.
Definition poppler-form.h:720
@ CertificateTrusted
The certificate is considered trusted.
Definition poppler-form.h:717
@ CertificateNotVerified
The certificate is not yet verified.
Definition poppler-form.h:723
@ CertificateExpired
The signing time is outside the validity bounds of this certificate.
Definition poppler-form.h:721
HashAlgorithm
The hash algorithm of the signature.
Definition poppler-form.h:732
time_t signingTime() const
The signing time associated with the signature.
SignatureStatus
The verification result of the signature.
Definition poppler-form.h:702
@ SignatureNotVerified
The signature is not yet verified.
Definition poppler-form.h:709
@ SignatureDigestMismatch
The document content was changed after the signature was applied.
Definition poppler-form.h:705
@ SignatureGenericError
The signature could not be verified.
Definition poppler-form.h:707
@ SignatureDecodingError
The signature CMS/PKCS7 structure is malformed.
Definition poppler-form.h:706
@ SignatureValid
The signature is cryptographically valid.
Definition poppler-form.h:703
@ SignatureNotFound
The requested signature is not present in the document.
Definition poppler-form.h:708
@ SignatureInvalid
The signature is cryptographically invalid.
Definition poppler-form.h:704
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:996
CryptoSignBackendFeature
Definition poppler-form.h:1027
@ BackendAsksPassphrase
If the backend itself out of band requests passwords or if the host applicaion somehow must do it.
Definition poppler-form.h:1030
QVector< CryptoSignBackend > availableCryptoSignBackends()
The available compiled-in backends.
Combination of an error data and type of error string.
Definition poppler-qt5.h:136