]> git.parisson.com Git - pdf.js.git/commitdiff
Handle references for color space names that are defined in a dictionary
author= <=>
Thu, 22 Sep 2011 20:17:28 +0000 (13:17 -0700)
committer= <=>
Thu, 22 Sep 2011 20:17:28 +0000 (13:17 -0700)
pdf.js
test/pdfs/hudsonsurvey.pdf.link [new file with mode: 0644]
test/test_manifest.json

diff --git a/pdf.js b/pdf.js
index 1b80424d65997bcec4cfad1787c78f5d18760a90..8a7c645cee87c7ce12efd60d99f125221a028134 100644 (file)
--- 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 (file)
index 0000000..ab3b730
--- /dev/null
@@ -0,0 +1 @@
+https://issues.apache.org/jira/secure/attachment/12421789/survey.pdf
\ No newline at end of file
index edf13b7c58a8505cba7a66f6b17b4b4caa9a1623..231857fa88154599d0d141667f1e37516ed8da9b 100644 (file)
        "link": true,
        "rounds": 1,
        "type": "load"
+    },
+    {  "id": "hudsonsurvey",
+       "file": "pdfs/hudsonsurvey.pdf",
+       "link": true,
+       "rounds": 1,
+       "type": "load"
     }
 ]