mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Ignore invalid /CIDToGIDMap-entries when parsing fonts (issue 15139)
In the referenced PDF document the fonts have /CIDToGIDMap-entries that cannot be loaded. Hence, only when `ignoreErrors` is set, we'll now ignore these corrupt /CIDToGIDMap-entries and fallback to simply assume that no such data is available. Given that this is *clearly* a case of a corrupt PDF document, there's no guarantee that this will "fix" things in the general case since a /CIDToGIDMap may be *required* in order for some composite fonts to render correctly. However, attempting to render *something* is surely better than skipping a font altogether.
This commit is contained in:
parent
7a4b72ed11
commit
60bd9580e2
3 changed files with 19 additions and 3 deletions
1
test/pdfs/issue15139.pdf.link
Normal file
1
test/pdfs/issue15139.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://github.com/mozilla/pdf.js/files/9137443/sample4a.pdf
|
|
@ -4980,6 +4980,14 @@
|
|||
"lastPage": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue15139",
|
||||
"file": "pdfs/issue15139.pdf",
|
||||
"md5": "0f2beb6a788d1e47bb9af737f6670493",
|
||||
"rounds": 1,
|
||||
"link": true,
|
||||
"lastPage": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "gesamt",
|
||||
"file": "pdfs/gesamt.pdf",
|
||||
"md5": "743aaa6f46ed0a42864f079d632d942e",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue