diff --git a/bower.json b/bower.json index 533987c3f..dba308a3d 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.335", + "version": "1.1.337", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index d3fca64f2..3d08ff6d5 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.335'; -PDFJS.build = '94d9a27'; +PDFJS.version = '1.1.337'; +PDFJS.build = '61f9052'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -13446,7 +13446,7 @@ var ColorSpace = (function ColorSpaceClosure() { * @param {Number} n Number of components the color space has. */ ColorSpace.isDefaultDecode = function ColorSpace_isDefaultDecode(decode, n) { - if (!decode) { + if (!isArray(decode)) { return true; } @@ -38991,7 +38991,8 @@ var JpegStream = (function JpegStreamClosure() { JpegStream.prototype.isNativelySupported = function JpegStream_isNativelySupported(xref, res) { var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res); - return cs.name === 'DeviceGray' || cs.name === 'DeviceRGB'; + return (cs.name === 'DeviceGray' || cs.name === 'DeviceRGB') && + cs.isDefaultDecode(this.dict.get('Decode', 'D')); }; /** * Checks if the image can be decoded by the browser. @@ -38999,8 +39000,8 @@ var JpegStream = (function JpegStreamClosure() { JpegStream.prototype.isNativelyDecodable = function JpegStream_isNativelyDecodable(xref, res) { var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res); - var numComps = cs.numComps; - return numComps === 1 || numComps === 3; + return (cs.numComps === 1 || cs.numComps === 3) && + cs.isDefaultDecode(this.dict.get('Decode', 'D')); }; return JpegStream; diff --git a/build/pdf.js b/build/pdf.js index e15bceae4..999e0440a 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.335'; -PDFJS.build = '94d9a27'; +PDFJS.version = '1.1.337'; +PDFJS.build = '61f9052'; (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 c148e16ef..0280bc97d 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.335'; -PDFJS.build = '94d9a27'; +PDFJS.version = '1.1.337'; +PDFJS.build = '61f9052'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -7045,7 +7045,7 @@ var ColorSpace = (function ColorSpaceClosure() { * @param {Number} n Number of components the color space has. */ ColorSpace.isDefaultDecode = function ColorSpace_isDefaultDecode(decode, n) { - if (!decode) { + if (!isArray(decode)) { return true; } @@ -32590,7 +32590,8 @@ var JpegStream = (function JpegStreamClosure() { JpegStream.prototype.isNativelySupported = function JpegStream_isNativelySupported(xref, res) { var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res); - return cs.name === 'DeviceGray' || cs.name === 'DeviceRGB'; + return (cs.name === 'DeviceGray' || cs.name === 'DeviceRGB') && + cs.isDefaultDecode(this.dict.get('Decode', 'D')); }; /** * Checks if the image can be decoded by the browser. @@ -32598,8 +32599,8 @@ var JpegStream = (function JpegStreamClosure() { JpegStream.prototype.isNativelyDecodable = function JpegStream_isNativelyDecodable(xref, res) { var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res); - var numComps = cs.numComps; - return numComps === 1 || numComps === 3; + return (cs.numComps === 1 || cs.numComps === 3) && + cs.isDefaultDecode(this.dict.get('Decode', 'D')); }; return JpegStream; diff --git a/package.json b/package.json index 721cabb3a..7daa5f2fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.335", + "version": "1.1.337", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",