From 8072052fb19d0190e8ba149fc6749e8dc3a463ea Mon Sep 17 00:00:00 2001 From: = <=> Date: Thu, 22 Sep 2011 13:17:28 -0700 Subject: [PATCH] Handle references for color space names that are defined in a dictionary --- pdf.js | 2 +- test/pdfs/hudsonsurvey.pdf.link | 1 + test/test_manifest.json | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 test/pdfs/hudsonsurvey.pdf.link diff --git a/pdf.js b/pdf.js index 1b80424d6..8a7c645ce 100644 --- a/pdf.js +++ b/pdf.js @@ -5431,7 +5431,7 @@ var ColorSpace = (function colorSpaceColorSpace() { constructor.parse = function colorspace_parse(cs, xref, res) { if (IsName(cs)) { - var colorSpaces = res.get('ColorSpace'); + var colorSpaces = xref.fetchIfRef(res.get('ColorSpace')); if (IsDict(colorSpaces)) { var refcs = colorSpaces.get(cs.name); if (refcs) diff --git a/test/pdfs/hudsonsurvey.pdf.link b/test/pdfs/hudsonsurvey.pdf.link new file mode 100644 index 000000000..ab3b730db --- /dev/null +++ b/test/pdfs/hudsonsurvey.pdf.link @@ -0,0 +1 @@ +https://issues.apache.org/jira/secure/attachment/12421789/survey.pdf \ No newline at end of file diff --git a/test/test_manifest.json b/test/test_manifest.json index edf13b7c5..231857fa8 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -145,5 +145,11 @@ "link": true, "rounds": 1, "type": "load" + }, + { "id": "hudsonsurvey", + "file": "pdfs/hudsonsurvey.pdf", + "link": true, + "rounds": 1, + "type": "load" } ]