From 7e2074faa96a98204d7c625a30715cbe458ff7b9 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 22 Sep 2014 16:31:16 -0500 Subject: [PATCH] PDF.js version 1.0.600 --- bower.json | 2 +- build/pdf.combined.js | 57 ++++++++++++++++++++++++++++++++++++++++--- build/pdf.js | 4 +-- build/pdf.worker.js | 57 ++++++++++++++++++++++++++++++++++++++++--- package.json | 2 +- 5 files changed, 110 insertions(+), 12 deletions(-) diff --git a/bower.json b/bower.json index 706277d1f..ef12afdef 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.598", + "version": "1.0.600", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 5d6baa457..b1ed430e1 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.598'; -PDFJS.build = '666cf02'; +PDFJS.version = '1.0.600'; +PDFJS.build = '5786014'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -17745,20 +17745,69 @@ var CMap = (function CMapClosure() { return [0, 1]; } - }; return CMap; })(); +// A special case of CMap, where the _map array implicitly has a length of +// 65535 and each element is equal to its index. var IdentityCMap = (function IdentityCMapClosure() { function IdentityCMap(vertical, n) { CMap.call(this); this.vertical = vertical; this.addCodespaceRange(n, 0, 0xffff); - this.mapCidRange(0, 0xffff, 0); } Util.inherit(IdentityCMap, CMap, {}); + IdentityCMap.prototype = { + addCodespaceRange: CMap.prototype.addCodespaceRange, + + mapCidRange: function(low, high, dstLow) { + error('should not call mapCidRange'); + }, + + mapBfRange: function(low, high, dstLow) { + error('should not call mapBfRange'); + }, + + mapBfRangeToArray: function(low, high, array) { + error('should not call mapBfRangeToArray'); + }, + + mapOne: function(src, dst) { + error('should not call mapCidOne'); + }, + + lookup: function(code) { + return (isInt(code) && code <= 0xffff) ? code : undefined; + }, + + contains: function(code) { + return isInt(code) && code <= 0xffff; + }, + + forEach: function(callback) { + for (var i = 0; i <= 0xffff; i++) { + callback(i, i); + } + }, + + charCodeOf: function(value) { + return (isInt(value) && value <= 0xffff) ? value : -1; + }, + + getMap: function() { + // Sometimes identity maps must be instantiated, but it's rare. + var map = new Array(0x10000); + for (var i = 0; i <= 0xffff; i++) { + map[i] = i; + } + return map; + }, + + readCharCode: CMap.prototype.readCharCode + }; + return IdentityCMap; })(); diff --git a/build/pdf.js b/build/pdf.js index 9b36fefec..75429a3a3 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.598'; -PDFJS.build = '666cf02'; +PDFJS.version = '1.0.600'; +PDFJS.build = '5786014'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 619373c2c..365e929ed 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.598'; -PDFJS.build = '666cf02'; +PDFJS.version = '1.0.600'; +PDFJS.build = '5786014'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -12888,20 +12888,69 @@ var CMap = (function CMapClosure() { return [0, 1]; } - }; return CMap; })(); +// A special case of CMap, where the _map array implicitly has a length of +// 65535 and each element is equal to its index. var IdentityCMap = (function IdentityCMapClosure() { function IdentityCMap(vertical, n) { CMap.call(this); this.vertical = vertical; this.addCodespaceRange(n, 0, 0xffff); - this.mapCidRange(0, 0xffff, 0); } Util.inherit(IdentityCMap, CMap, {}); + IdentityCMap.prototype = { + addCodespaceRange: CMap.prototype.addCodespaceRange, + + mapCidRange: function(low, high, dstLow) { + error('should not call mapCidRange'); + }, + + mapBfRange: function(low, high, dstLow) { + error('should not call mapBfRange'); + }, + + mapBfRangeToArray: function(low, high, array) { + error('should not call mapBfRangeToArray'); + }, + + mapOne: function(src, dst) { + error('should not call mapCidOne'); + }, + + lookup: function(code) { + return (isInt(code) && code <= 0xffff) ? code : undefined; + }, + + contains: function(code) { + return isInt(code) && code <= 0xffff; + }, + + forEach: function(callback) { + for (var i = 0; i <= 0xffff; i++) { + callback(i, i); + } + }, + + charCodeOf: function(value) { + return (isInt(value) && value <= 0xffff) ? value : -1; + }, + + getMap: function() { + // Sometimes identity maps must be instantiated, but it's rare. + var map = new Array(0x10000); + for (var i = 0; i <= 0xffff; i++) { + map[i] = i; + } + return map; + }, + + readCharCode: CMap.prototype.readCharCode + }; + return IdentityCMap; })(); diff --git a/package.json b/package.json index 98d8f29f4..45cbe98e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.598", + "version": "1.0.600", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",