[Pkg-javascript-commits] [pdf.js] 182/210: merged with earlier commits

David Prévot taffit at moszumanska.debian.org
Thu Jun 5 14:21:16 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch upstream
in repository pdf.js.

commit 81d3f4a89b51629cffafe083de47e2ce7e8fbd85
Author: koderok <yadavpulkit at gmail.com>
Date:   Sat May 24 05:37:25 2014 +0530

    merged with earlier commits
---
 src/core/obj.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/core/obj.js b/src/core/obj.js
index 5b1415c..0b6d2d7 100644
--- a/src/core/obj.js
+++ b/src/core/obj.js
@@ -503,6 +503,22 @@ var Catalog = (function CatalogClosure() {
           javaScript.push(stringToPDFString(js));
         }
       }
+
+      // Append OpenAction actions to javaScript array
+      var openactionDict = this.catDict.get('OpenAction');
+      if (isDict(openactionDict)) {
+        var objType = openactionDict.get('Type');
+        var actionType = openactionDict.get('S');
+        var action = openactionDict.get('N');
+        var isPrintAction = (isName(objType) && objType.name === 'Action' &&
+                            isName(actionType) && actionType.name === 'Named' &&
+                            isName(action) && action.name === 'Print');
+        
+        if (isPrintAction) {
+          javaScript.push('print(true);');
+        }
+      }
+
       return shadow(this, 'javaScript', javaScript);
     },
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list