mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 01:28:06 +02:00
Merge pull request #14823 from Snuffleupagus/issue-14821
Ignore invalid /Encoding-entries when parsing fonts (issue 14821)
This commit is contained in:
commit
f9e54d9226
4 changed files with 13 additions and 1 deletions
|
@ -3405,7 +3405,12 @@ class PartialEvaluator {
|
|||
} else if (encoding instanceof Name) {
|
||||
baseEncodingName = encoding.name;
|
||||
} else {
|
||||
throw new FormatError("Encoding is not a Name nor a Dict");
|
||||
const msg = "Encoding is not a Name nor a Dict";
|
||||
|
||||
if (!this.options.ignoreErrors) {
|
||||
throw new FormatError(msg);
|
||||
}
|
||||
warn(msg);
|
||||
}
|
||||
// According to table 114 if the encoding is a named encoding it must be
|
||||
// one of these predefined encodings.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue