diff --git a/bower.json b/bower.json index af18ecad7..9806998bf 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.5.387", + "version": "1.5.389", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index d17a76252..7ff205796 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.5.387'; -var pdfjsBuild = '200c857'; +var pdfjsVersion = '1.5.389'; +var pdfjsBuild = 'e5baf7e'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? @@ -37444,7 +37444,13 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { }, getSinglePixelWidth: function CanvasGraphics_getSinglePixelWidth(scale) { if (this.cachedGetSinglePixelWidth === null) { + // NOTE: The `save` and `restore` commands used below is a workaround + // that is necessary in order to prevent `mozCurrentTransformInverse` + // from intermittently returning incorrect values in Firefox, see: + // https://github.com/mozilla/pdf.js/issues/7188. + this.ctx.save(); var inverse = this.ctx.mozCurrentTransformInverse; + this.ctx.restore(); // max of the current horizontal and vertical scale this.cachedGetSinglePixelWidth = Math.sqrt(Math.max( (inverse[0] * inverse[0] + inverse[1] * inverse[1]), diff --git a/build/pdf.js b/build/pdf.js index 6f7b6ad9a..cf7b6b7cb 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.5.387'; -var pdfjsBuild = '200c857'; +var pdfjsVersion = '1.5.389'; +var pdfjsBuild = 'e5baf7e'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? @@ -8522,7 +8522,13 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { }, getSinglePixelWidth: function CanvasGraphics_getSinglePixelWidth(scale) { if (this.cachedGetSinglePixelWidth === null) { + // NOTE: The `save` and `restore` commands used below is a workaround + // that is necessary in order to prevent `mozCurrentTransformInverse` + // from intermittently returning incorrect values in Firefox, see: + // https://github.com/mozilla/pdf.js/issues/7188. + this.ctx.save(); var inverse = this.ctx.mozCurrentTransformInverse; + this.ctx.restore(); // max of the current horizontal and vertical scale this.cachedGetSinglePixelWidth = Math.sqrt(Math.max( (inverse[0] * inverse[0] + inverse[1] * inverse[1]), diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 6e761bf21..e7b7af03f 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.5.387'; -var pdfjsBuild = '200c857'; +var pdfjsVersion = '1.5.389'; +var pdfjsBuild = 'e5baf7e'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? diff --git a/package.json b/package.json index f531dccd8..03fc2f8d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.5.387", + "version": "1.5.389", "main": "build/pdf.js", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [