Ensure that Page.getOperatorList handles Annotation parsing errors correctly (issue 15557)

*Fixes a regression from PR 15246, sorry about that!*

The return value of all `Annotation.getOperatorList` methods was changed in PR 15246, however I missed updating the error code-path in `Page.getOperatorList` which thus breaks all operatorList-parsing for pages with corrupt Annotations.
This commit is contained in:
Jonas Jenwald 2022-10-10 09:40:30 +02:00
parent dff444d441
commit 081e897588
4 changed files with 13 additions and 1 deletions

View File

@ -486,7 +486,11 @@ class Page {
"getOperatorList - ignoring annotation data during " +
`"${task.name}" task: "${reason}".`
);
return null;
return {
opList: null,
separateForm: false,
separateCanvas: false,
};
})
);
}

View File

@ -366,6 +366,7 @@
!issue1045.pdf
!issue5010.pdf
!issue10339_reduced.pdf
!issue15557.pdf
!issue4934.pdf
!issue4650.pdf
!issue6721_reduced.pdf

BIN
test/pdfs/issue15557.pdf Normal file

Binary file not shown.

View File

@ -646,6 +646,13 @@
"rounds": 1,
"type": "eq"
},
{ "id": "issue15557",
"file": "pdfs/issue15557.pdf",
"md5": "5f024a42acf27f3eadc4c7418e8f4e42",
"rounds": 1,
"type": "eq",
"annotations": true
},
{ "id": "hmm-pdf",
"file": "pdfs/hmm.pdf",
"md5": "e08467e60101ee5f4a59716e86db6dc9",