Skip to content

Commit

Permalink
Merge pull request #5748 from Snuffleupagus/issue-5747
Browse files Browse the repository at this point in the history
Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747)
  • Loading branch information
yurydelendik committed Feb 26, 2015
2 parents ec7bab6 + 7c89965 commit 23916b2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/colorspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ var ColorSpace = (function ColorSpaceClosure() {
case 'CMYK':
return 'DeviceCmykCS';
case 'CalGray':
params = cs[1].getAll();
params = xref.fetchIfRef(cs[1]).getAll();
return ['CalGrayCS', params];
case 'CalRGB':
params = cs[1].getAll();
params = xref.fetchIfRef(cs[1]).getAll();
return ['CalRGBCS', params];
case 'ICCBased':
var stream = xref.fetchIfRef(cs[1]);
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
!issue5470.pdf
!issue5501.pdf
!issue5599.pdf
!issue5747.pdf
!gradientfill.pdf
!bug903856.pdf
!bug850854.pdf
Expand Down
Binary file added test/pdfs/issue5747.pdf
Binary file not shown.
7 changes: 7 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,13 @@
"link": false,
"type": "eq"
},
{ "id": "issue5747",
"file": "pdfs/issue5747.pdf",
"md5": "5c36afc931dd1a3321ffa2e88952d174",
"rounds": 1,
"link": false,
"type": "eq"
},
{ "id": "bug893730",
"file": "pdfs/bug893730.pdf",
"md5": "2587379fb1b3bbff89c14f0863e78383",
Expand Down

0 comments on commit 23916b2

Please sign in to comment.