فهرست منبع

PDF.js version 1.5.389 - See mozilla/pdf.js@e5baf7ec368620c5884e258462e1fd6a7fb13576

Pdf Bot 8 سال پیش
والد
کامیت
ba0c84425a
5فایلهای تغییر یافته به همراه20 افزوده شده و 8 حذف شده
  1. 1 1
      bower.json
  2. 8 2
      build/pdf.combined.js
  3. 8 2
      build/pdf.js
  4. 2 2
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
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"

+ 8 - 2
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]),

+ 8 - 2
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]),

+ 2 - 2
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 ?

+ 1 - 1
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": [