Browse Source

PDF.js version 1.9.476 - See mozilla/pdf.js@26c4536964e5bf914e0f3ea6a034621f44629c97

pdfjsbot 7 years ago
parent
commit
dcb0f6e3ec

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.9.474",
+  "version": "1.9.476",
   "main": [
     "build/pdf.js",
     "build/pdf.worker.js"

+ 6 - 6
build/pdf.combined.js

@@ -13675,8 +13675,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
 }();
 var version, build;
 {
-  exports.version = version = '1.9.474';
-  exports.build = build = 'd368a5ba';
+  exports.version = version = '1.9.476';
+  exports.build = build = '26c45369';
 }
 exports.getDocument = getDocument;
 exports.LoopbackPort = LoopbackPort;
@@ -29032,8 +29032,8 @@ if (!_global_scope2.default.PDFJS) {
 }
 var PDFJS = _global_scope2.default.PDFJS;
 {
-  PDFJS.version = '1.9.474';
-  PDFJS.build = 'd368a5ba';
+  PDFJS.version = '1.9.476';
+  PDFJS.build = '26c45369';
 }
 PDFJS.pdfBug = false;
 if (PDFJS.verbosity !== undefined) {
@@ -50339,8 +50339,8 @@ exports.PDFDataTransportStream = PDFDataTransportStream;
 "use strict";
 
 
-var pdfjsVersion = '1.9.474';
-var pdfjsBuild = 'd368a5ba';
+var pdfjsVersion = '1.9.476';
+var pdfjsBuild = '26c45369';
 var pdfjsSharedUtil = __w_pdfjs_require__(0);
 var pdfjsDisplayGlobal = __w_pdfjs_require__(70);
 var pdfjsDisplayAPI = __w_pdfjs_require__(37);

File diff suppressed because it is too large
+ 0 - 0
build/pdf.combined.js.map


+ 6 - 6
build/pdf.js

@@ -4406,8 +4406,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
 }();
 var version, build;
 {
-  exports.version = version = '1.9.474';
-  exports.build = build = 'd368a5ba';
+  exports.version = version = '1.9.476';
+  exports.build = build = '26c45369';
 }
 exports.getDocument = getDocument;
 exports.LoopbackPort = LoopbackPort;
@@ -6892,8 +6892,8 @@ if (!_global_scope2.default.PDFJS) {
 }
 var PDFJS = _global_scope2.default.PDFJS;
 {
-  PDFJS.version = '1.9.474';
-  PDFJS.build = 'd368a5ba';
+  PDFJS.version = '1.9.476';
+  PDFJS.build = '26c45369';
 }
 PDFJS.pdfBug = false;
 if (PDFJS.verbosity !== undefined) {
@@ -14795,8 +14795,8 @@ exports.PDFDataTransportStream = PDFDataTransportStream;
 "use strict";
 
 
-var pdfjsVersion = '1.9.474';
-var pdfjsBuild = 'd368a5ba';
+var pdfjsVersion = '1.9.476';
+var pdfjsBuild = '26c45369';
 var pdfjsSharedUtil = __w_pdfjs_require__(0);
 var pdfjsDisplayGlobal = __w_pdfjs_require__(54);
 var pdfjsDisplayAPI = __w_pdfjs_require__(30);

File diff suppressed because it is too large
+ 0 - 0
build/pdf.js.map


File diff suppressed because it is too large
+ 0 - 0
build/pdf.min.js


+ 2 - 2
build/pdf.worker.js

@@ -42137,8 +42137,8 @@ exports.Type1Parser = Type1Parser;
 "use strict";
 
 
-var pdfjsVersion = '1.9.474';
-var pdfjsBuild = 'd368a5ba';
+var pdfjsVersion = '1.9.476';
+var pdfjsBuild = '26c45369';
 var pdfjsCoreWorker = __w_pdfjs_require__(61);
 exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
 

File diff suppressed because it is too large
+ 0 - 0
build/pdf.worker.js.map


+ 2 - 2
lib/display/api.js

@@ -1581,8 +1581,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
 }();
 var version, build;
 {
-  exports.version = version = '1.9.474';
-  exports.build = build = 'd368a5ba';
+  exports.version = version = '1.9.476';
+  exports.build = build = '26c45369';
 }
 exports.getDocument = getDocument;
 exports.LoopbackPort = LoopbackPort;

+ 2 - 2
lib/display/global.js

@@ -45,8 +45,8 @@ if (!_global_scope2.default.PDFJS) {
 }
 var PDFJS = _global_scope2.default.PDFJS;
 {
-  PDFJS.version = '1.9.474';
-  PDFJS.build = 'd368a5ba';
+  PDFJS.version = '1.9.476';
+  PDFJS.build = '26c45369';
 }
 PDFJS.pdfBug = false;
 if (PDFJS.verbosity !== undefined) {

+ 2 - 2
lib/pdf.js

@@ -14,8 +14,8 @@
  */
 'use strict';
 
-var pdfjsVersion = '1.9.474';
-var pdfjsBuild = 'd368a5ba';
+var pdfjsVersion = '1.9.476';
+var pdfjsBuild = '26c45369';
 var pdfjsSharedUtil = require('./shared/util.js');
 var pdfjsDisplayGlobal = require('./display/global.js');
 var pdfjsDisplayAPI = require('./display/api.js');

+ 2 - 2
lib/pdf.worker.js

@@ -14,7 +14,7 @@
  */
 'use strict';
 
-var pdfjsVersion = '1.9.474';
-var pdfjsBuild = 'd368a5ba';
+var pdfjsVersion = '1.9.476';
+var pdfjsBuild = '26c45369';
 var pdfjsCoreWorker = require('./core/worker.js');
 exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

+ 12 - 23
lib/web/app.js

@@ -471,8 +471,7 @@ var PDFViewerApplication = {
         return _this3.open(file, args);
       });
     }
-    var parameters = Object.create(null),
-        scale = void 0;
+    var parameters = Object.create(null);
     if (typeof file === 'string') {
       this.setTitleUsingUrl(file);
       parameters.url = file;
@@ -484,14 +483,14 @@ var PDFViewerApplication = {
     }
     if (args) {
       for (var prop in args) {
+        if (!_pdf.PDFJS.pdfjsNext && prop === 'scale') {
+          console.error('Call of open() with obsolete "scale" argument, ' + 'please use the "defaultZoomValue" preference instead.');
+          continue;
+        } else if (prop === 'length') {
+          this.pdfDocumentProperties.setFileSize(args[prop]);
+        }
         parameters[prop] = args[prop];
       }
-      if (args.scale) {
-        scale = args.scale;
-      }
-      if (args.length) {
-        this.pdfDocumentProperties.setFileSize(args.length);
-      }
     }
     var loadingTask = (0, _pdf.getDocument)(parameters);
     this.pdfLoadingTask = loadingTask;
@@ -507,7 +506,7 @@ var PDFViewerApplication = {
     };
     loadingTask.onUnsupportedFeature = this.fallback.bind(this);
     return loadingTask.promise.then(function (pdfDocument) {
-      _this3.load(pdfDocument, scale);
+      _this3.load(pdfDocument);
     }, function (exception) {
       var message = exception && exception.message;
       var loadingErrorMessage = void 0;
@@ -620,10 +619,9 @@ var PDFViewerApplication = {
       }
     }
   },
-  load: function load(pdfDocument, scale) {
+  load: function load(pdfDocument) {
     var _this6 = this;
 
-    scale = scale || _ui_utils.UNKNOWN_SCALE;
     this.pdfDocument = pdfDocument;
     pdfDocument.getDownloadInfo().then(function () {
       _this6.downloadComplete = true;
@@ -697,10 +695,7 @@ var PDFViewerApplication = {
         var hash = _ref4.hash,
             sidebarView = _ref4.sidebarView;
 
-        _this6.setInitialView(hash, {
-          sidebarView: sidebarView,
-          scale: scale
-        });
+        _this6.setInitialView(hash, { sidebarView: sidebarView });
         initialParams.hash = hash;
         if (!_this6.isViewerEmbedded) {
           pdfViewer.focus();
@@ -798,11 +793,8 @@ var PDFViewerApplication = {
     });
   },
   setInitialView: function setInitialView(storedHash) {
-    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-    var _options$scale = options.scale,
-        scale = _options$scale === undefined ? 0 : _options$scale,
-        _options$sidebarView = options.sidebarView,
-        sidebarView = _options$sidebarView === undefined ? _pdf_sidebar.SidebarView.NONE : _options$sidebarView;
+    var _ref6 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+        sidebarView = _ref6.sidebarView;
 
     this.isInitialViewSet = true;
     this.pdfSidebar.setInitialView(sidebarView);
@@ -815,9 +807,6 @@ var PDFViewerApplication = {
       this.initialBookmark = null;
     } else if (storedHash) {
       this.pdfLinkService.setHash(storedHash);
-    } else if (scale) {
-      this.pdfViewer.currentScaleValue = scale;
-      this.page = 1;
     }
     this.toolbar.setPageNumber(this.pdfViewer.currentPageNumber, this.pdfViewer.currentPageLabel);
     this.secondaryToolbar.setPageNumber(this.pdfViewer.currentPageNumber);

+ 3 - 1
lib/web/pdf_sidebar.js

@@ -74,7 +74,9 @@ var PDFSidebar = function () {
     }
   }, {
     key: 'setInitialView',
-    value: function setInitialView(view) {
+    value: function setInitialView() {
+      var view = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : SidebarView.NONE;
+
       if (this.isInitialViewSet) {
         return;
       }

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.9.474",
+  "version": "1.9.476",
   "main": "build/pdf.js",
   "description": "Generic build of Mozilla's PDF.js library.",
   "keywords": [

Some files were not shown because too many files changed in this diff