]> 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, 21 Jul 2011 22:18:00 +0000 (15:18 -0700)
fonts.js

index e4a426cbe3c02400e12805ab72bbaef51c341833..3a52ae83ac8b8b5dcd6f70871ba82622abd1c4a9 100755 (executable)
--- a/fonts.js
+++ b/fonts.js
@@ -386,11 +386,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.textMatrix = properties.textMatrix || IDENTITY_MATRIX;