mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 09:08:07 +02:00
Ignore invalid /Encoding-entries when parsing fonts (issue 14821)
In the referenced PDF document the fonts have /Encoding-entries that are Streams (containing completely bogus data), which are thus obviously not valid here. Hence, only when `ignoreErrors` is set, we'll now ignore these corrupt /Encoding-entries and fallback to the existing code to try and infer a usable encoding. Given that this is *clearly* a case of corrupt PDF documents, there's no guarantee that this will "fix" all such cases, however it's the best that we do here and shouldn't really be worse than ignoring an entire font.
This commit is contained in:
parent
452a98b0e0
commit
e723da7261
4 changed files with 13 additions and 1 deletions
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -129,6 +129,7 @@
|
|||
!asciihexdecode.pdf
|
||||
!bug766086.pdf
|
||||
!bug793632.pdf
|
||||
!issue14821.pdf
|
||||
!bug1020858.pdf
|
||||
!prefilled_f1040.pdf
|
||||
!bug1050040.pdf
|
||||
|
|
BIN
test/pdfs/issue14821.pdf
Normal file
BIN
test/pdfs/issue14821.pdf
Normal file
Binary file not shown.
|
@ -3612,6 +3612,12 @@
|
|||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue14821",
|
||||
"file": "pdfs/issue14821.pdf",
|
||||
"md5": "ae77afb0f98c62e6b7fe7f912c84a75c",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "issue6165",
|
||||
"file": "pdfs/issue6165.pdf",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue