diff options
-rw-r--r-- | poppler/PDFDoc.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc index a3c01e62..c46ed0c4 100644 --- a/poppler/PDFDoc.cc +++ b/poppler/PDFDoc.cc @@ -2174,6 +2174,10 @@ bool PDFDoc::sign(const char *saveFilename, const char *certNickname, const char pdfFontName = form->addFontToDefaultResources("Helvetica", "").fontName; } + if (pdfFontName.empty()) { + return false; + } + const DefaultAppearance da { { objName, pdfFontName.c_str() }, fontSize, std::move(fontColor) }; Object annotObj = Object(new Dict(getXRef())); |