diff options
author | Nicolas Fella <nicolas.fella@kdab.com> | 2023-04-28 18:51:59 +0200 |
---|---|---|
committer | Albert Astals Cid <tsdgeos@yahoo.es> | 2023-04-29 13:39:18 +0000 |
commit | c5bc25a0094b3fd10e8eea5296a006a4f530a771 (patch) | |
tree | e9e5a44da607a7c365d308eb4582c79d8444742c | |
parent | 39d0009741465344f8a30a3129081cd18bb378bb (diff) |
Set SigFlags when signing unsigned signature
When creating a new signature we change SigFlags to indicate that there are now signatures
However when signing an existing unsigned signature form that doesn't happen
This breaks working on the file in Acrobat reader, e.g. it doesn't show the signatures panel and can't save amendments to the file
Fixes https://bugs.kde.org/show_bug.cgi?id=461371
-rw-r--r-- | poppler/Form.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/poppler/Form.cc b/poppler/Form.cc index b5a41c53..67657a9a 100644 --- a/poppler/Form.cc +++ b/poppler/Form.cc @@ -732,6 +732,9 @@ bool FormWidgetSignature::signDocumentWithAppearance(const std::string &saveFile ffs->setCustomAppearanceLeftContent(signatureTextLeft); ffs->setCustomAppearanceLeftFontSize(leftFontSize); + // say that there a now signatures and that we should append only + doc->getCatalog()->getAcroForm()->dictSet("SigFlags", Object(3)); + const bool success = signDocument(saveFilename, certNickname, password, reason, location, ownerPassword, userPassword); // Now bring back the annotation appearance back to what it was |