]> git.parisson.com Git - pdf.js.git/commitdiff
Make xObjForm use raw format
authorJulian Viereck <julian.viereck@gmail.com>
Tue, 6 Sep 2011 02:47:16 +0000 (19:47 -0700)
committerJulian Viereck <julian.viereck@gmail.com>
Thu, 15 Sep 2011 15:20:43 +0000 (08:20 -0700)
pdf.js
web/viewer.js

diff --git a/pdf.js b/pdf.js
index db4d23179062a6aa5f3f6889b3c03c9f7d0739f3..2a494bf41e57dc1554efcf187b76af4f621f2228 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4252,8 +4252,8 @@ var PartialEvaluator = (function() {
 
               if ('Form' == type.name) {
                 // console.log("got xobj that is a Form");
-                args[0].code = this.eval(xobj, xref, xobj.dict.get('Resources'),
-                                         fonts, images);
+                args[0].raw = this.evalRaw(xobj, xref, xobj.dict.get('Resources'),
+                                         fonts, images, uniquePrefix);
               }
               if (xobj instanceof JpegStream) {
                 images.bind(xobj); // monitoring image load
@@ -5369,7 +5369,8 @@ var CanvasGraphics = (function() {
         this.endPath();
       }
 
-      this.execute(ref.code, this.xref, stream.dict.get('Resources'));
+      var code = this.pe.evalFromRaw(ref.raw)
+      this.execute(code, this.xref, stream.dict.get('Resources'));
 
       this.restore();
     },
index 082dfaa87815e88c76e4ca59e92f15ca8969ef61..a65eb2e77ea645af940a32d0e183278a722c55d3 100644 (file)
@@ -152,7 +152,8 @@ var PDFView = {
     while (container.hasChildNodes())
       container.removeChild(container.lastChild);
 
-    var pdf = new WorkerPDFDoc(data);
+    // var pdf = new WorkerPDFDoc(data);
+    var pdf = new PDFDoc(new Stream(data));
     var pagesCount = pdf.numPages;
     document.getElementById('numPages').innerHTML = pagesCount;