Ensure that the /Annots-entry, on /Page-instances, is actually an Array (issue 12714)
In the referenced PDF document, the second and third page has *corrupt* /Annots-entries which contain /Dict-data rather than the intended Arrays.
This commit is contained in:
parent
93b3ba2abb
commit
796a0d3155
@ -437,11 +437,8 @@ class Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get annotations() {
|
get annotations() {
|
||||||
return shadow(
|
const annots = this._getInheritableProperty("Annots");
|
||||||
this,
|
return shadow(this, "annotations", Array.isArray(annots) ? annots : []);
|
||||||
"annotations",
|
|
||||||
this._getInheritableProperty("Annots") || []
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get _parsedAnnotations() {
|
get _parsedAnnotations() {
|
||||||
|
1
test/pdfs/issue12714.pdf.link
Normal file
1
test/pdfs/issue12714.pdf.link
Normal file
@ -0,0 +1 @@
|
|||||||
|
https://github.com/mozilla/pdf.js/files/5669997/b49fe733-63e0-4972-8b47-3a05c2c8e881.pdf
|
@ -2028,6 +2028,15 @@
|
|||||||
"link": true,
|
"link": true,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "issue12714",
|
||||||
|
"file": "pdfs/issue12714.pdf",
|
||||||
|
"md5": "f9ee31c74f9e342e95122b0b3bc84fa0",
|
||||||
|
"rounds": 1,
|
||||||
|
"firstPage": 2,
|
||||||
|
"lastPage": 2,
|
||||||
|
"link": true,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "issue7872",
|
{ "id": "issue7872",
|
||||||
"file": "pdfs/issue7872.pdf",
|
"file": "pdfs/issue7872.pdf",
|
||||||
"md5": "81781dfecfcb7e9cd9cc7e60f8b747b7",
|
"md5": "81781dfecfcb7e9cd9cc7e60f8b747b7",
|
||||||
|
Loading…
Reference in New Issue
Block a user