Skip to content

Commit

Permalink
Merge pull request #17690 from calixteman/issue17689
Browse files Browse the repository at this point in the history
Avoid to access to a missing cidSystemInfo property
  • Loading branch information
calixteman authored Feb 19, 2024
2 parents d96fd80 + a6eadf8 commit 99fa713
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -3719,7 +3719,9 @@ class PartialEvaluator {
properties.composite &&
((properties.cMap.builtInCMap &&
!(properties.cMap instanceof IdentityCMap)) ||
(properties.cidSystemInfo.registry === "Adobe" &&
// The font is supposed to have a CIDSystemInfo dictionary, but some
// PDFs don't include it (fixes issue 17689), hence the `?'.
(properties.cidSystemInfo?.registry === "Adobe" &&
(properties.cidSystemInfo.ordering === "GB1" ||
properties.cidSystemInfo.ordering === "CNS1" ||
properties.cidSystemInfo.ordering === "Japan1" ||
Expand Down
2 changes: 2 additions & 0 deletions test/pdfs/issue17689.pdf.link
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://github.com/mozilla/pdf.js/files/14328616/2023_12_13.pdf

10 changes: 10 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9736,5 +9736,15 @@
"md5": "407695b36b4611bc7c501a891c8a4b28",
"rounds": 1,
"type": "eq"
},
{
"id": "issue17689",
"file": "pdfs/issue17689.pdf",
"md5": "2d260d3795e551fa047eef7c3dbab45b",
"rounds": 1,
"link": true,
"firstPage": 2,
"lastPage": 2,
"type": "eq"
}
]

0 comments on commit 99fa713

Please sign in to comment.