[poppler] poppler/Form.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Apr 29 13:43:01 UTC 2023


 poppler/Form.cc |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit c5bc25a0094b3fd10e8eea5296a006a4f530a771
Author: Nicolas Fella <nicolas.fella at kdab.com>
Date:   Fri Apr 28 18:51:59 2023 +0200

    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

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


More information about the poppler mailing list