Browse Source

PDF.js version 2.0.276 - See mozilla/pdf.js@96c573ad387696c6efd24d080a44d592b50da703

master v2.0.276
pdfjsbot 7 years ago
parent
commit
1d582f30ce
  1. 2
      bower.json
  2. 16
      build/pdf.combined.js
  3. 2
      build/pdf.combined.js.map
  4. 14
      build/pdf.js
  5. 2
      build/pdf.js.map
  6. 2
      build/pdf.min.js
  7. 6
      build/pdf.worker.js
  8. 2
      build/pdf.worker.js.map
  9. 2
      build/pdf.worker.min.js
  10. 2
      lib/core/worker.js
  11. 6
      lib/display/api.js
  12. 4
      lib/display/global.js
  13. 4
      lib/pdf.js
  14. 4
      lib/pdf.worker.js
  15. 7
      lib/web/app.js
  16. 11
      lib/web/ui_utils.js
  17. 2
      package.json
  18. 11
      web/pdf_viewer.js
  19. 2
      web/pdf_viewer.js.map

2
bower.json

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

16
build/pdf.combined.js

@ -11628,7 +11628,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) { if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed')); return Promise.reject(new Error('Worker was destroyed'));
} }
var apiVersion = '2.0.274'; var apiVersion = '2.0.276';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange'); source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch'); source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream'); source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -12920,8 +12920,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '2.0.274'; exports.version = version = '2.0.276';
exports.build = build = 'f774abc8'; exports.build = build = '96c573ad';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;
@ -26718,8 +26718,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict"; "use strict";
var pdfjsVersion = '2.0.274'; var pdfjsVersion = '2.0.276';
var pdfjsBuild = 'f774abc8'; var pdfjsBuild = '96c573ad';
var pdfjsSharedUtil = __w_pdfjs_require__(0); var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(132); var pdfjsDisplayGlobal = __w_pdfjs_require__(132);
var pdfjsDisplayAPI = __w_pdfjs_require__(66); var pdfjsDisplayAPI = __w_pdfjs_require__(66);
@ -31916,8 +31916,8 @@ if (!_global_scope2.default.PDFJS) {
} }
var PDFJS = _global_scope2.default.PDFJS; var PDFJS = _global_scope2.default.PDFJS;
{ {
PDFJS.version = '2.0.274'; PDFJS.version = '2.0.276';
PDFJS.build = 'f774abc8'; PDFJS.build = '96c573ad';
} }
PDFJS.pdfBug = false; PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) { if (PDFJS.verbosity !== undefined) {
@ -35284,7 +35284,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null; var cancelXHRs = null;
var WorkerTasks = []; var WorkerTasks = [];
var apiVersion = docParams.apiVersion; var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.274'; var workerVersion = '2.0.276';
if (apiVersion !== null && apiVersion !== workerVersion) { if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
} }

2
build/pdf.combined.js.map

File diff suppressed because one or more lines are too long

14
build/pdf.js

@ -3308,7 +3308,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) { if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed')); return Promise.reject(new Error('Worker was destroyed'));
} }
var apiVersion = '2.0.274'; var apiVersion = '2.0.276';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange'); source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch'); source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream'); source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -4681,8 +4681,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '2.0.274'; exports.version = version = '2.0.276';
exports.build = build = 'f774abc8'; exports.build = build = '96c573ad';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;
@ -7440,8 +7440,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict"; "use strict";
var pdfjsVersion = '2.0.274'; var pdfjsVersion = '2.0.276';
var pdfjsBuild = 'f774abc8'; var pdfjsBuild = '96c573ad';
var pdfjsSharedUtil = __w_pdfjs_require__(0); var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(115); var pdfjsDisplayGlobal = __w_pdfjs_require__(115);
var pdfjsDisplayAPI = __w_pdfjs_require__(58); var pdfjsDisplayAPI = __w_pdfjs_require__(58);
@ -12638,8 +12638,8 @@ if (!_global_scope2.default.PDFJS) {
} }
var PDFJS = _global_scope2.default.PDFJS; var PDFJS = _global_scope2.default.PDFJS;
{ {
PDFJS.version = '2.0.274'; PDFJS.version = '2.0.276';
PDFJS.build = 'f774abc8'; PDFJS.build = '96c573ad';
} }
PDFJS.pdfBug = false; PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) { if (PDFJS.verbosity !== undefined) {

2
build/pdf.js.map

File diff suppressed because one or more lines are too long

2
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

6
build/pdf.worker.js vendored

@ -21955,8 +21955,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
"use strict"; "use strict";
var pdfjsVersion = '2.0.274'; var pdfjsVersion = '2.0.276';
var pdfjsBuild = 'f774abc8'; var pdfjsBuild = '96c573ad';
var pdfjsCoreWorker = __w_pdfjs_require__(73); var pdfjsCoreWorker = __w_pdfjs_require__(73);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -22169,7 +22169,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null; var cancelXHRs = null;
var WorkerTasks = []; var WorkerTasks = [];
var apiVersion = docParams.apiVersion; var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.274'; var workerVersion = '2.0.276';
if (apiVersion !== null && apiVersion !== workerVersion) { if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
} }

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

2
build/pdf.worker.min.js vendored

File diff suppressed because one or more lines are too long

2
lib/core/worker.js

@ -223,7 +223,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null; var cancelXHRs = null;
var WorkerTasks = []; var WorkerTasks = [];
var apiVersion = docParams.apiVersion; var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.274'; var workerVersion = '2.0.276';
if (apiVersion !== null && apiVersion !== workerVersion) { if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
} }

6
lib/display/api.js

@ -178,7 +178,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) { if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed')); return Promise.reject(new Error('Worker was destroyed'));
} }
var apiVersion = '2.0.274'; var apiVersion = '2.0.276';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange'); source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch'); source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream'); source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -1551,8 +1551,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '2.0.274'; exports.version = version = '2.0.276';
exports.build = build = 'f774abc8'; exports.build = build = '96c573ad';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;

4
lib/display/global.js

@ -51,8 +51,8 @@ if (!_global_scope2.default.PDFJS) {
} }
var PDFJS = _global_scope2.default.PDFJS; var PDFJS = _global_scope2.default.PDFJS;
{ {
PDFJS.version = '2.0.274'; PDFJS.version = '2.0.276';
PDFJS.build = 'f774abc8'; PDFJS.build = '96c573ad';
} }
PDFJS.pdfBug = false; PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) { if (PDFJS.verbosity !== undefined) {

4
lib/pdf.js

@ -21,8 +21,8 @@
*/ */
'use strict'; 'use strict';
var pdfjsVersion = '2.0.274'; var pdfjsVersion = '2.0.276';
var pdfjsBuild = 'f774abc8'; var pdfjsBuild = '96c573ad';
var pdfjsSharedUtil = require('./shared/util.js'); var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js'); var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js'); var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -21,7 +21,7 @@
*/ */
'use strict'; 'use strict';
var pdfjsVersion = '2.0.274'; var pdfjsVersion = '2.0.276';
var pdfjsBuild = 'f774abc8'; var pdfjsBuild = '96c573ad';
var pdfjsCoreWorker = require('./core/worker.js'); var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

7
lib/web/app.js

@ -511,6 +511,8 @@ var PDFViewerApplication = {
this.store = null; this.store = null;
this.isInitialViewSet = false; this.isInitialViewSet = false;
this.downloadComplete = false; this.downloadComplete = false;
this.url = '';
this.baseUrl = '';
this.pdfSidebar.reset(); this.pdfSidebar.reset();
this.pdfOutlineViewer.reset(); this.pdfOutlineViewer.reset();
this.pdfAttachmentViewer.reset(); this.pdfAttachmentViewer.reset();
@ -550,6 +552,11 @@ var PDFViewerApplication = {
parameters[prop] = args[prop]; parameters[prop] = args[prop];
} }
} }
if (this.url && (0, _ui_utils.isFileSchema)(this.url)) {
var appConfig = this.appConfig;
appConfig.toolbar.download.setAttribute('hidden', 'true');
appConfig.secondaryToolbar.downloadButton.setAttribute('hidden', 'true');
}
var loadingTask = (0, _pdf.getDocument)(parameters); var loadingTask = (0, _pdf.getDocument)(parameters);
this.pdfLoadingTask = loadingTask; this.pdfLoadingTask = loadingTask;
loadingTask.onPassword = function (updateCallback, reason) { loadingTask.onPassword = function (updateCallback, reason) {

11
lib/web/ui_utils.js

@ -24,7 +24,7 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.waitOnEventOrTimeout = exports.WaitOnType = exports.localized = exports.animationStarted = exports.normalizeWheelEventDelta = exports.binarySearchFirstItem = exports.watchScroll = exports.scrollIntoView = exports.getOutputScale = exports.approximateFraction = exports.roundToDivide = exports.getVisibleElements = exports.parseQueryString = exports.noContextMenuHandler = exports.getPDFFileNameFromURL = exports.ProgressBar = exports.EventBus = exports.NullL10n = exports.mozL10n = exports.RendererType = exports.PresentationModeState = exports.cloneObj = exports.isValidRotation = exports.VERTICAL_PADDING = exports.SCROLLBAR_PADDING = exports.MAX_AUTO_SCALE = exports.UNKNOWN_SCALE = exports.MAX_SCALE = exports.MIN_SCALE = exports.DEFAULT_SCALE = exports.DEFAULT_SCALE_VALUE = exports.CSS_UNITS = undefined; exports.waitOnEventOrTimeout = exports.WaitOnType = exports.localized = exports.animationStarted = exports.normalizeWheelEventDelta = exports.binarySearchFirstItem = exports.watchScroll = exports.scrollIntoView = exports.getOutputScale = exports.approximateFraction = exports.roundToDivide = exports.getVisibleElements = exports.parseQueryString = exports.noContextMenuHandler = exports.getPDFFileNameFromURL = exports.ProgressBar = exports.EventBus = exports.NullL10n = exports.mozL10n = exports.RendererType = exports.PresentationModeState = exports.cloneObj = exports.isFileSchema = exports.isValidRotation = exports.VERTICAL_PADDING = exports.SCROLLBAR_PADDING = exports.MAX_AUTO_SCALE = exports.UNKNOWN_SCALE = exports.MAX_SCALE = exports.MIN_SCALE = exports.DEFAULT_SCALE = exports.DEFAULT_SCALE_VALUE = exports.CSS_UNITS = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
@ -286,6 +286,14 @@ function getVisibleElements(scrollEl, views) {
function noContextMenuHandler(evt) { function noContextMenuHandler(evt) {
evt.preventDefault(); evt.preventDefault();
} }
function isFileSchema(url) {
var i = 0,
ii = url.length;
while (i < ii && url[i].trim() === '') {
i++;
}
return url.substr(i, 7).toLowerCase() === 'file://';
}
function isDataSchema(url) { function isDataSchema(url) {
var i = 0, var i = 0,
ii = url.length; ii = url.length;
@ -521,6 +529,7 @@ exports.MAX_AUTO_SCALE = MAX_AUTO_SCALE;
exports.SCROLLBAR_PADDING = SCROLLBAR_PADDING; exports.SCROLLBAR_PADDING = SCROLLBAR_PADDING;
exports.VERTICAL_PADDING = VERTICAL_PADDING; exports.VERTICAL_PADDING = VERTICAL_PADDING;
exports.isValidRotation = isValidRotation; exports.isValidRotation = isValidRotation;
exports.isFileSchema = isFileSchema;
exports.cloneObj = cloneObj; exports.cloneObj = cloneObj;
exports.PresentationModeState = PresentationModeState; exports.PresentationModeState = PresentationModeState;
exports.RendererType = RendererType; exports.RendererType = RendererType;

2
package.json

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

11
web/pdf_viewer.js

@ -120,7 +120,7 @@ module.exports = pdfjsLib;
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.waitOnEventOrTimeout = exports.WaitOnType = exports.localized = exports.animationStarted = exports.normalizeWheelEventDelta = exports.binarySearchFirstItem = exports.watchScroll = exports.scrollIntoView = exports.getOutputScale = exports.approximateFraction = exports.roundToDivide = exports.getVisibleElements = exports.parseQueryString = exports.noContextMenuHandler = exports.getPDFFileNameFromURL = exports.ProgressBar = exports.EventBus = exports.NullL10n = exports.mozL10n = exports.RendererType = exports.PresentationModeState = exports.cloneObj = exports.isValidRotation = exports.VERTICAL_PADDING = exports.SCROLLBAR_PADDING = exports.MAX_AUTO_SCALE = exports.UNKNOWN_SCALE = exports.MAX_SCALE = exports.MIN_SCALE = exports.DEFAULT_SCALE = exports.DEFAULT_SCALE_VALUE = exports.CSS_UNITS = undefined; exports.waitOnEventOrTimeout = exports.WaitOnType = exports.localized = exports.animationStarted = exports.normalizeWheelEventDelta = exports.binarySearchFirstItem = exports.watchScroll = exports.scrollIntoView = exports.getOutputScale = exports.approximateFraction = exports.roundToDivide = exports.getVisibleElements = exports.parseQueryString = exports.noContextMenuHandler = exports.getPDFFileNameFromURL = exports.ProgressBar = exports.EventBus = exports.NullL10n = exports.mozL10n = exports.RendererType = exports.PresentationModeState = exports.cloneObj = exports.isFileSchema = exports.isValidRotation = exports.VERTICAL_PADDING = exports.SCROLLBAR_PADDING = exports.MAX_AUTO_SCALE = exports.UNKNOWN_SCALE = exports.MAX_SCALE = exports.MIN_SCALE = exports.DEFAULT_SCALE = exports.DEFAULT_SCALE_VALUE = exports.CSS_UNITS = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
@ -382,6 +382,14 @@ function getVisibleElements(scrollEl, views) {
function noContextMenuHandler(evt) { function noContextMenuHandler(evt) {
evt.preventDefault(); evt.preventDefault();
} }
function isFileSchema(url) {
var i = 0,
ii = url.length;
while (i < ii && url[i].trim() === '') {
i++;
}
return url.substr(i, 7).toLowerCase() === 'file://';
}
function isDataSchema(url) { function isDataSchema(url) {
var i = 0, var i = 0,
ii = url.length; ii = url.length;
@ -617,6 +625,7 @@ exports.MAX_AUTO_SCALE = MAX_AUTO_SCALE;
exports.SCROLLBAR_PADDING = SCROLLBAR_PADDING; exports.SCROLLBAR_PADDING = SCROLLBAR_PADDING;
exports.VERTICAL_PADDING = VERTICAL_PADDING; exports.VERTICAL_PADDING = VERTICAL_PADDING;
exports.isValidRotation = isValidRotation; exports.isValidRotation = isValidRotation;
exports.isFileSchema = isFileSchema;
exports.cloneObj = cloneObj; exports.cloneObj = cloneObj;
exports.PresentationModeState = PresentationModeState; exports.PresentationModeState = PresentationModeState;
exports.RendererType = RendererType; exports.RendererType = RendererType;

2
web/pdf_viewer.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save