1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Add support, in Dict.merge, for merging of "sub"-dictionaries

This allows for merging of dictionaries one level deeper than previously. This could be useful e.g. for /Resources dictionaries, where you want to e.g. merge their respective /Font dictionaries (and other) together rather than picking just the first one.
This commit is contained in:
Jonas Jenwald 2020-08-28 01:05:33 +02:00
parent aa27e7fb8d
commit 784a420027
5 changed files with 115 additions and 18 deletions

View file

@ -114,7 +114,7 @@ class Page {
if (value.length === 1 || !isDict(value[0])) {
return value[0];
}
return Dict.merge(this.xref, value);
return Dict.merge({ xref: this.xref, dictArray: value });
}
get content() {