]> git.parisson.com Git - pdf.js.git/commitdiff
Don't display cmds used on the page by default + turn on worker support for now again
authorJulian Viereck <julian.viereck@gmail.com>
Tue, 6 Sep 2011 17:44:26 +0000 (10:44 -0700)
committerJulian Viereck <julian.viereck@gmail.com>
Thu, 15 Sep 2011 15:20:43 +0000 (08:20 -0700)
web/viewer.js
worker/boot.js

index a65eb2e77ea645af940a32d0e183278a722c55d3..0273f7170aa58ee85138d1ad95cc8e0351eefa5a 100644 (file)
@@ -152,8 +152,13 @@ var PDFView = {
     while (container.hasChildNodes())
       container.removeChild(container.lastChild);
 
-    // var pdf = new WorkerPDFDoc(data);
-    var pdf = new PDFDoc(new Stream(data));
+    var pdf;
+    if (true /* Use Worker */) {
+      pdf = new WorkerPDFDoc(data);
+    } else {
+      pdf = new PDFDoc(new Stream(data));
+    }
+
     var pagesCount = pdf.numPages;
     document.getElementById('numPages').innerHTML = pagesCount;
 
index 57314c13f1530b63888b87ff096929080a508400..89d9acbbb911af74304592a3532a916f8f2c57c4 100644 (file)
@@ -51,18 +51,19 @@ var handler = new MessageHandler("worker", {
     // TODO: Handle images here.
     
     console.log("about to send page", pageNum);
-    
-    // Make a copy of the fnArray and show all cmds it has.
-    var fnArray = preCompilation.fnArray.slice(0).sort();
-    for (var i = 0; i < fnArray.length; true) {
-      if (fnArray[i] == fnArray[i + 1]) {
-        fnArray.splice(i, 1);
-      } else {
-        i++;
+   
+    if (false /* show used commands */) {
+      // Make a copy of the fnArray and show all cmds it has.
+      var fnArray = preCompilation.fnArray.slice(0).sort();
+      for (var i = 0; i < fnArray.length; true) {
+        if (fnArray[i] == fnArray[i + 1]) {
+          fnArray.splice(i, 1);
+        } else {
+          i++;
+        }
       }
-    }
-    console.log("cmds", fnArray);
-    
+      console.log("cmds", fnArray);
+    } 
     
     handler.send("page", {
       pageNum:        pageNum,