diff options
Diffstat (limited to 'libqpdf/QPDFAcroFormDocumentHelper.cc')
-rw-r--r-- | libqpdf/QPDFAcroFormDocumentHelper.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libqpdf/QPDFAcroFormDocumentHelper.cc b/libqpdf/QPDFAcroFormDocumentHelper.cc index 7491d5a7..b0777f9b 100644 --- a/libqpdf/QPDFAcroFormDocumentHelper.cc +++ b/libqpdf/QPDFAcroFormDocumentHelper.cc @@ -742,8 +742,9 @@ QPDFAcroFormDocumentHelper::adjustDefaultAppearances( &this->qpdf, DA.getUTF8Value()); try { + auto nwarnings = this->qpdf.numWarnings(); da_stream.parseAsContents(&rf); - if (rf.sawBad()) + if (this->qpdf.numWarnings() > nwarnings) { QTC::TC("qpdf", "QPDFAcroFormDocumentHelper /DA parse error"); } @@ -858,8 +859,9 @@ QPDFAcroFormDocumentHelper::adjustAppearanceStream( ResourceFinder rf; try { + auto nwarnings = this->qpdf.numWarnings(); stream.parseAsContents(&rf); - if (rf.sawBad()) + if (this->qpdf.numWarnings() > nwarnings) { QTC::TC("qpdf", "QPDFAcroFormDocumentHelper AP parse error"); } |