Merge pull request #18166 from Snuffleupagus/bug-1898802

Prevent XRef errors from breaking font loading (bug 1898802)
This commit is contained in:
Jonas Jenwald 2024-05-24 22:29:21 +02:00 committed by GitHub
commit b78480a375
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 1 deletions

View File

@ -1261,7 +1261,11 @@ class PartialEvaluator {
return this.fontCache.get(fontRef);
}
font = this.xref.fetchIfRef(fontRef);
try {
font = this.xref.fetchIfRef(fontRef);
} catch (ex) {
warn(`loadFont - lookup failed: "${ex}".`);
}
}
if (!(font instanceof Dict)) {

View File

@ -0,0 +1 @@
https://bugzilla.mozilla.org/attachment.cgi?id=9403877

View File

@ -5447,6 +5447,15 @@
"lastPage": 1,
"type": "eq"
},
{
"id": "bug1898802",
"file": "pdfs/bug1898802.pdf",
"md5": "65c3af306253faa8967982812aff523e",
"rounds": 1,
"link": true,
"lastPage": 1,
"type": "eq"
},
{
"id": "issue4890",
"file": "pdfs/issue4890.pdf",