mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Allow skipping of errors when reading broken/corrupt ToUnicode data (issue 11549)
This will allow font loading/parsing to continue, rather than immediately failing, when broken/corrupt CMap data is encountered.
This commit is contained in:
parent
517ccb7a39
commit
4c54395ff6
5 changed files with 51 additions and 26 deletions
|
@ -996,7 +996,7 @@ var CMapFactory = (function CMapFactoryClosure() {
|
|||
}
|
||||
|
||||
return {
|
||||
create(params) {
|
||||
async create(params) {
|
||||
var encoding = params.encoding;
|
||||
var fetchBuiltInCMap = params.fetchBuiltInCMap;
|
||||
var useCMap = params.useCMap;
|
||||
|
@ -1015,7 +1015,7 @@ var CMapFactory = (function CMapFactoryClosure() {
|
|||
return parsedCMap;
|
||||
});
|
||||
}
|
||||
return Promise.reject(new Error("Encoding required."));
|
||||
throw new Error("Encoding required.");
|
||||
},
|
||||
};
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue