diff --git a/bower.json b/bower.json index 0a3dc8b49..72c40f4d7 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.18", + "version": "1.1.20", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 81d89ae96..7464bdd6c 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.1.18'; -PDFJS.build = '64d49e1'; +PDFJS.version = '1.1.20'; +PDFJS.build = '3a8d4a7'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -18201,8 +18201,11 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { var cmap, cmapObj = toUnicode; if (isName(cmapObj)) { cmap = CMapFactory.create(cmapObj, - { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null).getMap(); - return new ToUnicodeMap(cmap); + { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null); + if (cmap instanceof IdentityCMap) { + return new IdentityToUnicodeMap(0, 0xFFFF); + } + return new ToUnicodeMap(cmap.getMap()); } else if (isStream(cmapObj)) { cmap = CMapFactory.create(cmapObj, { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null).getMap(); @@ -22657,7 +22660,7 @@ var IdentityToUnicodeMap = (function IdentityToUnicodeMapClosure() { IdentityToUnicodeMap.prototype = { get length() { - error('should not access .length'); + return (this.lastChar + 1) - this.firstChar; }, forEach: function (callback) { diff --git a/build/pdf.js b/build/pdf.js index 052b14d74..e32877972 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.1.18'; -PDFJS.build = '64d49e1'; +PDFJS.version = '1.1.20'; +PDFJS.build = '3a8d4a7'; (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 06e8d5ffa..efac40b69 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.1.18'; -PDFJS.build = '64d49e1'; +PDFJS.version = '1.1.20'; +PDFJS.build = '3a8d4a7'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -11853,8 +11853,11 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { var cmap, cmapObj = toUnicode; if (isName(cmapObj)) { cmap = CMapFactory.create(cmapObj, - { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null).getMap(); - return new ToUnicodeMap(cmap); + { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null); + if (cmap instanceof IdentityCMap) { + return new IdentityToUnicodeMap(0, 0xFFFF); + } + return new ToUnicodeMap(cmap.getMap()); } else if (isStream(cmapObj)) { cmap = CMapFactory.create(cmapObj, { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null).getMap(); @@ -16309,7 +16312,7 @@ var IdentityToUnicodeMap = (function IdentityToUnicodeMapClosure() { IdentityToUnicodeMap.prototype = { get length() { - error('should not access .length'); + return (this.lastChar + 1) - this.firstChar; }, forEach: function (callback) { diff --git a/package.json b/package.json index 257374806..c09e66e19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.18", + "version": "1.1.20", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",