summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich E. Hoover <erich.e.hoover@gmail.com>2022-07-30 15:40:08 -0600
committerAlbert Astals Cid <tsdgeos@yahoo.es>2022-08-29 21:57:28 +0000
commit8452b0dee6b5267e785bf6dea4d7b537a4cfb637 (patch)
treee754534fc8520fbc044d5aa08d2a7e860141c317
parent2beb458226509c3babd78e658e1a8ac72ccfb2b8 (diff)
Form: When signing with an appearance, ensure that a Form exists
-rw-r--r--poppler/Form.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/poppler/Form.cc b/poppler/Form.cc
index 3657c03e..4dfba6dd 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -696,7 +696,7 @@ bool FormWidgetSignature::signDocumentWithAppearance(const char *saveFilename, c
GooString *aux = getField()->getDefaultAppearance();
std::string originalDefaultAppearance = aux ? aux->toStr() : std::string();
- Form *form = doc->getCatalog()->getForm();
+ Form *form = doc->getCatalog()->getCreateForm();
std::string pdfFontName = form->findFontInDefaultResources("Helvetica", "");
if (pdfFontName.empty()) {
pdfFontName = form->addFontToDefaultResources("Helvetica", "").fontName;