diff --git a/src/core/xref.js b/src/core/xref.js index dcbd49307..d75b899b9 100644 --- a/src/core/xref.js +++ b/src/core/xref.js @@ -591,10 +591,6 @@ class XRef { if (!(pagesDict instanceof Dict)) { continue; } - const pagesCount = pagesDict.get("Count"); - if (!Number.isInteger(pagesCount)) { - continue; - } // The top-level /Pages dictionary isn't obviously corrupt. } catch (ex) { trailerError = ex; diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 047f06317..9d25fd4f7 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -94,6 +94,7 @@ !issue9084.pdf !issue12963.pdf !issue9105_reduced.pdf +!issue9105_other.pdf !issue9252.pdf !issue9262_reduced.pdf !issue9291.pdf diff --git a/test/pdfs/issue9105_other.pdf b/test/pdfs/issue9105_other.pdf new file mode 100644 index 000000000..513713df9 --- /dev/null +++ b/test/pdfs/issue9105_other.pdf @@ -0,0 +1,14 @@ +%PDF-1. +1 0 obj +<>]/Resources<<>>>> +2 0 obj +<<>> +stream +BT +/F1 105 Tf +0 400 Td +(Adobe tweet) Tj +ET +endstream +endobj +trailer<>>> \ No newline at end of file diff --git a/test/test_manifest.json b/test/test_manifest.json index aa7368805..ae251db11 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -1748,6 +1748,13 @@ "link": false, "type": "eq" }, + { "id": "issue9105_other", + "file": "pdfs/issue9105_other.pdf", + "md5": "4c8b9c2cceb9c5d621e1d50b3dc38efc", + "rounds": 1, + "link": false, + "type": "eq" + }, { "id": "issue269_1", "file": "pdfs/issue269_1.pdf", "md5": "ab932f697b4d2e2bf700de15a8efea9c",