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:
parent
aa27e7fb8d
commit
784a420027
5 changed files with 115 additions and 18 deletions
|
@ -726,8 +726,10 @@ class PartialEvaluator {
|
|||
const tilingOpList = new OperatorList();
|
||||
// Merge the available resources, to prevent issues when the patternDict
|
||||
// is missing some /Resources entries (fixes issue6541.pdf).
|
||||
const resourcesArray = [patternDict.get("Resources"), resources];
|
||||
const patternResources = Dict.merge(this.xref, resourcesArray);
|
||||
const patternResources = Dict.merge({
|
||||
xref: this.xref,
|
||||
dictArray: [patternDict.get("Resources"), resources],
|
||||
});
|
||||
|
||||
return this.getOperatorList({
|
||||
stream: pattern,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue