Fetch parameters if they are |Ref|s in Pattern color spaces (issue 6081)

Fixes 6081.
This commit is contained in:
Jonas Jenwald 2015-06-04 21:28:14 +02:00
parent 6203dcd292
commit 64e1fb99fe
4 changed files with 10 additions and 2 deletions

View File

@ -260,7 +260,7 @@ var ColorSpace = (function ColorSpaceClosure() {
error('unrecognized colorspace ' + mode);
}
} else if (isArray(cs)) {
mode = cs[0].name;
mode = xref.fetchIfRef(cs[0]).name;
this.mode = mode;
var numComps, params;
@ -293,7 +293,7 @@ var ColorSpace = (function ColorSpaceClosure() {
}
break;
case 'Pattern':
var basePatternCS = cs[1];
var basePatternCS = xref.fetchIfRef(cs[1]) || null;
if (basePatternCS) {
basePatternCS = ColorSpace.parseToIR(basePatternCS, xref, res);
}

View File

@ -134,3 +134,4 @@
!issue5909.pdf
!issue6010_1.pdf
!issue6010_2.pdf
!issue6081.pdf

BIN
test/pdfs/issue6081.pdf Normal file

Binary file not shown.

View File

@ -1531,6 +1531,13 @@
"type": "eq",
"about": "Pattern with current transform different than base transform."
},
{ "id": "issue6081",
"file": "pdfs/issue6081.pdf",
"md5": "854326ce9178d10ff4a0ff2aedf67e45",
"rounds": 1,
"link": false,
"type": "eq"
},
{ "id": "issue2462",
"file": "pdfs/issue2462.pdf",
"md5": "d4e3dddfdd35464c71cf0310bff29b42",