]> git.parisson.com Git - pdf.js.git/commitdiff
fixed reading from sream
authorsbarman <sbarman@L3CWZ5T.(none)>
Thu, 21 Jul 2011 22:18:00 +0000 (15:18 -0700)
committersbarman <sbarman@L3CWZ5T.(none)>
Thu, 18 Aug 2011 20:53:26 +0000 (13:53 -0700)
fonts.js

index 7dfa6ead7f509b95f3a6f20d227eca6157eda8a1..e2f2785238279ede40acc75a0d1caa936a03da7b 100755 (executable)
--- a/fonts.js
+++ b/fonts.js
@@ -448,11 +448,12 @@ var Font = (function Font() {
 
     var fileArr = [];
     file.reset();
+    file = file.getBytes();
     for (var i = 0, ii = file.length; i < ii; ++i)
       fileArr.push(file[i]);
 
-    writeToFile(data, '/tmp/' + name + '_orig');
-    writeToFile(fileArr, '/tmp/' + name + '_new');
+    writeToFile(data, '/tmp/' + name + '_new');
+    writeToFile(fileArr, '/tmp/' + name + '_orig');
 
     this.data = data;
     this.type = properties.type;