From b55e9d94e8b732f234601be44a71d3f3858d897b Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 22 Sep 2014 16:30:26 -0500 Subject: [PATCH] PDF.js version 1.0.544 --- bower.json | 2 +- build/pdf.combined.js | 23 +++++++++++------------ build/pdf.js | 23 +++++++++++------------ build/pdf.worker.js | 4 ++-- package.json | 2 +- 5 files changed, 26 insertions(+), 28 deletions(-) diff --git a/bower.json b/bower.json index 17fe2f14b..7389b76a5 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.538", + "version": "1.0.544", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index e0d928b5d..40a66f9be 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.538'; -PDFJS.build = '0b8b763'; +PDFJS.version = '1.0.544'; +PDFJS.build = 'df0b821'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -2081,8 +2081,7 @@ var PDFPageProxy = (function PDFPageProxyClosure() { // this call to render. this.pendingDestroy = false; - var renderingIntent = ('intent' in params ? - (params.intent == 'print' ? 'print' : 'display') : 'display'); + var renderingIntent = (params.intent === 'print' ? 'print' : 'display'); if (!this.intentStates[renderingIntent]) { this.intentStates[renderingIntent] = {}; @@ -2527,7 +2526,7 @@ var WorkerTransport = (function WorkerTransportClosure() { messageHandler.on('JpegDecode', function(data) { var imageUrl = data[0]; var components = data[1]; - if (components != 3 && components != 1) { + if (components !== 3 && components !== 1) { return Promise.reject( new Error('Only 3 components or 1 component can be returned')); } @@ -2546,13 +2545,13 @@ var WorkerTransport = (function WorkerTransportClosure() { var data = tmpCtx.getImageData(0, 0, width, height).data; var i, j; - if (components == 3) { + if (components === 3) { for (i = 0, j = 0; i < rgbaLength; i += 4, j += 3) { buf[j] = data[i]; buf[j + 1] = data[i + 1]; buf[j + 2] = data[i + 2]; } - } else if (components == 1) { + } else if (components === 1) { for (i = 0, j = 0; i < rgbaLength; i += 4, j++) { buf[j] = data[i]; } @@ -2936,8 +2935,8 @@ var Metadata = PDFJS.Metadata = (function MetadataClosure() { var chars = ''; for (var i = 0; i < bytes.length; i += 2) { var code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1); - chars += code >= 32 && code < 127 && code != 60 && code != 62 && - code != 38 && false ? String.fromCharCode(code) : + chars += code >= 32 && code < 127 && code !== 60 && code !== 62 && + code !== 38 && false ? String.fromCharCode(code) : '&#x' + (0x10000 + code).toString(16).substring(1) + ';'; } return '>' + chars; @@ -4213,7 +4212,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { // the current transformation matrix before the fillText/strokeText. // See https://bugzilla.mozilla.org/show_bug.cgi?id=726227 var browserFontSize = size >= MIN_FONT_SIZE ? size : MIN_FONT_SIZE; - this.current.fontSizeScale = browserFontSize != MIN_FONT_SIZE ? 1.0 : + this.current.fontSizeScale = browserFontSize !== MIN_FONT_SIZE ? 1.0 : size / MIN_FONT_SIZE; var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface; @@ -4359,7 +4358,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { lineWidth /= scale; } - if (fontSizeScale != 1.0) { + if (fontSizeScale !== 1.0) { ctx.scale(fontSizeScale, fontSizeScale); lineWidth /= fontSizeScale; } @@ -5897,7 +5896,7 @@ var TilingPattern = (function TilingPatternClosure() { }, clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) { - if (bbox && isArray(bbox) && 4 == bbox.length) { + if (bbox && isArray(bbox) && bbox.length === 4) { var bboxWidth = x1 - x0; var bboxHeight = y1 - y0; graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight); diff --git a/build/pdf.js b/build/pdf.js index 7ac22c68e..f34bb2e77 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.538'; -PDFJS.build = '0b8b763'; +PDFJS.version = '1.0.544'; +PDFJS.build = 'df0b821'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -2081,8 +2081,7 @@ var PDFPageProxy = (function PDFPageProxyClosure() { // this call to render. this.pendingDestroy = false; - var renderingIntent = ('intent' in params ? - (params.intent == 'print' ? 'print' : 'display') : 'display'); + var renderingIntent = (params.intent === 'print' ? 'print' : 'display'); if (!this.intentStates[renderingIntent]) { this.intentStates[renderingIntent] = {}; @@ -2571,7 +2570,7 @@ var WorkerTransport = (function WorkerTransportClosure() { messageHandler.on('JpegDecode', function(data) { var imageUrl = data[0]; var components = data[1]; - if (components != 3 && components != 1) { + if (components !== 3 && components !== 1) { return Promise.reject( new Error('Only 3 components or 1 component can be returned')); } @@ -2590,13 +2589,13 @@ var WorkerTransport = (function WorkerTransportClosure() { var data = tmpCtx.getImageData(0, 0, width, height).data; var i, j; - if (components == 3) { + if (components === 3) { for (i = 0, j = 0; i < rgbaLength; i += 4, j += 3) { buf[j] = data[i]; buf[j + 1] = data[i + 1]; buf[j + 2] = data[i + 2]; } - } else if (components == 1) { + } else if (components === 1) { for (i = 0, j = 0; i < rgbaLength; i += 4, j++) { buf[j] = data[i]; } @@ -2980,8 +2979,8 @@ var Metadata = PDFJS.Metadata = (function MetadataClosure() { var chars = ''; for (var i = 0; i < bytes.length; i += 2) { var code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1); - chars += code >= 32 && code < 127 && code != 60 && code != 62 && - code != 38 && false ? String.fromCharCode(code) : + chars += code >= 32 && code < 127 && code !== 60 && code !== 62 && + code !== 38 && false ? String.fromCharCode(code) : '&#x' + (0x10000 + code).toString(16).substring(1) + ';'; } return '>' + chars; @@ -4257,7 +4256,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { // the current transformation matrix before the fillText/strokeText. // See https://bugzilla.mozilla.org/show_bug.cgi?id=726227 var browserFontSize = size >= MIN_FONT_SIZE ? size : MIN_FONT_SIZE; - this.current.fontSizeScale = browserFontSize != MIN_FONT_SIZE ? 1.0 : + this.current.fontSizeScale = browserFontSize !== MIN_FONT_SIZE ? 1.0 : size / MIN_FONT_SIZE; var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface; @@ -4403,7 +4402,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { lineWidth /= scale; } - if (fontSizeScale != 1.0) { + if (fontSizeScale !== 1.0) { ctx.scale(fontSizeScale, fontSizeScale); lineWidth /= fontSizeScale; } @@ -5941,7 +5940,7 @@ var TilingPattern = (function TilingPatternClosure() { }, clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) { - if (bbox && isArray(bbox) && 4 == bbox.length) { + if (bbox && isArray(bbox) && bbox.length === 4) { var bboxWidth = x1 - x0; var bboxHeight = y1 - y0; graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight); diff --git a/build/pdf.worker.js b/build/pdf.worker.js index e0c319aae..209f80687 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.538'; -PDFJS.build = '0b8b763'; +PDFJS.version = '1.0.544'; +PDFJS.build = 'df0b821'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/package.json b/package.json index 196c8bbcd..9f36016e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.538", + "version": "1.0.544", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",