Browse Source

PDF.js version 1.8.550 - See mozilla/pdf.js@afb1cd7377fb3ad4446e6e66640ef42b4f89854b

master v1.8.550
pdfjsbot 8 years ago
parent
commit
3550c09e21
  1. 2
      bower.json
  2. 12
      build/pdf.combined.js
  3. 2
      build/pdf.combined.js.map
  4. 12
      build/pdf.js
  5. 2
      build/pdf.js.map
  6. 4
      build/pdf.min.js
  7. 4
      build/pdf.worker.js
  8. 2
      build/pdf.worker.js.map
  9. 4
      lib/display/api.js
  10. 4
      lib/display/global.js
  11. 4
      lib/pdf.js
  12. 4
      lib/pdf.worker.js
  13. 7
      lib/web/interfaces.js
  14. 200
      lib/web/pdf_link_service.js
  15. 2
      package.json
  16. 200
      web/pdf_viewer.js
  17. 2
      web/pdf_viewer.js.map

2
bower.json

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

12
build/pdf.combined.js

@ -13116,8 +13116,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -13116,8 +13116,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.8.548';
exports.build = build = 'ca3c08f1';
exports.version = version = '1.8.550';
exports.build = build = 'afb1cd73';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -28627,8 +28627,8 @@ if (!_util.globalScope.PDFJS) { @@ -28627,8 +28627,8 @@ if (!_util.globalScope.PDFJS) {
}
var PDFJS = _util.globalScope.PDFJS;
{
PDFJS.version = '1.8.548';
PDFJS.build = 'ca3c08f1';
PDFJS.version = '1.8.550';
PDFJS.build = 'afb1cd73';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -47254,8 +47254,8 @@ exports.TilingPattern = TilingPattern; @@ -47254,8 +47254,8 @@ exports.TilingPattern = TilingPattern;
"use strict";
var pdfjsVersion = '1.8.548';
var pdfjsBuild = 'ca3c08f1';
var pdfjsVersion = '1.8.550';
var pdfjsBuild = 'afb1cd73';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(25);
var pdfjsDisplayAPI = __w_pdfjs_require__(10);

2
build/pdf.combined.js.map

File diff suppressed because one or more lines are too long

12
build/pdf.js

@ -3849,8 +3849,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -3849,8 +3849,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.8.548';
exports.build = build = 'ca3c08f1';
exports.version = version = '1.8.550';
exports.build = build = 'afb1cd73';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -5905,8 +5905,8 @@ if (!_util.globalScope.PDFJS) { @@ -5905,8 +5905,8 @@ if (!_util.globalScope.PDFJS) {
}
var PDFJS = _util.globalScope.PDFJS;
{
PDFJS.version = '1.8.548';
PDFJS.build = 'ca3c08f1';
PDFJS.version = '1.8.550';
PDFJS.build = 'afb1cd73';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -11444,8 +11444,8 @@ exports.TilingPattern = TilingPattern; @@ -11444,8 +11444,8 @@ exports.TilingPattern = TilingPattern;
"use strict";
var pdfjsVersion = '1.8.548';
var pdfjsBuild = 'ca3c08f1';
var pdfjsVersion = '1.8.550';
var pdfjsBuild = 'afb1cd73';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(8);
var pdfjsDisplayAPI = __w_pdfjs_require__(3);

2
build/pdf.js.map

File diff suppressed because one or more lines are too long

4
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

4
build/pdf.worker.js vendored

@ -40390,8 +40390,8 @@ exports.Type1Parser = Type1Parser; @@ -40390,8 +40390,8 @@ exports.Type1Parser = Type1Parser;
"use strict";
var pdfjsVersion = '1.8.548';
var pdfjsBuild = 'ca3c08f1';
var pdfjsVersion = '1.8.550';
var pdfjsBuild = 'afb1cd73';
var pdfjsCoreWorker = __w_pdfjs_require__(8);
{
__w_pdfjs_require__(18);

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

4
lib/display/api.js

@ -1480,8 +1480,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -1480,8 +1480,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.8.548';
exports.build = build = 'ca3c08f1';
exports.version = version = '1.8.550';
exports.build = build = 'afb1cd73';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/display/global.js

@ -39,8 +39,8 @@ if (!_util.globalScope.PDFJS) { @@ -39,8 +39,8 @@ if (!_util.globalScope.PDFJS) {
}
var PDFJS = _util.globalScope.PDFJS;
{
PDFJS.version = '1.8.548';
PDFJS.build = 'ca3c08f1';
PDFJS.version = '1.8.550';
PDFJS.build = 'afb1cd73';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

4
lib/pdf.js

@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
*/
'use strict';
var pdfjsVersion = '1.8.548';
var pdfjsBuild = 'ca3c08f1';
var pdfjsVersion = '1.8.550';
var pdfjsBuild = 'afb1cd73';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
*/
'use strict';
var pdfjsVersion = '1.8.548';
var pdfjsBuild = 'ca3c08f1';
var pdfjsVersion = '1.8.550';
var pdfjsBuild = 'afb1cd73';
var pdfjsCoreWorker = require('./core/worker.js');
{
require('./core/network.js');

7
lib/web/interfaces.js

@ -38,6 +38,13 @@ var IPDFLinkService = function () { @@ -38,6 +38,13 @@ var IPDFLinkService = function () {
}, {
key: 'executeNamedAction',
value: function executeNamedAction(action) {}
}, {
key: 'onFileAttachmentAnnotation',
value: function onFileAttachmentAnnotation(_ref) {
var id = _ref.id,
filename = _ref.filename,
content = _ref.content;
}
}, {
key: 'cachePageRef',
value: function cachePageRef(pageNum, pageRef) {}

200
lib/web/pdf_link_service.js

@ -21,47 +21,54 @@ exports.SimpleLinkService = exports.PDFLinkService = undefined; @@ -21,47 +21,54 @@ exports.SimpleLinkService = exports.PDFLinkService = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
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 _dom_events = require('./dom_events');
var _ui_utils = require('./ui_utils');
var PDFLinkService = function PDFLinkServiceClosure() {
function PDFLinkService(options) {
options = options || {};
this.eventBus = options.eventBus || (0, _dom_events.getGlobalEventBus)();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var PDFLinkService = function () {
function PDFLinkService() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
eventBus = _ref.eventBus;
_classCallCheck(this, PDFLinkService);
this.eventBus = eventBus || (0, _dom_events.getGlobalEventBus)();
this.baseUrl = null;
this.pdfDocument = null;
this.pdfViewer = null;
this.pdfHistory = null;
this._pagesRefCache = null;
}
PDFLinkService.prototype = {
setDocument: function PDFLinkService_setDocument(pdfDocument, baseUrl) {
_createClass(PDFLinkService, [{
key: 'setDocument',
value: function setDocument(pdfDocument, baseUrl) {
this.baseUrl = baseUrl;
this.pdfDocument = pdfDocument;
this._pagesRefCache = Object.create(null);
},
setViewer: function PDFLinkService_setViewer(pdfViewer) {
}
}, {
key: 'setViewer',
value: function setViewer(pdfViewer) {
this.pdfViewer = pdfViewer;
},
setHistory: function PDFLinkService_setHistory(pdfHistory) {
}
}, {
key: 'setHistory',
value: function setHistory(pdfHistory) {
this.pdfHistory = pdfHistory;
},
get pagesCount() {
return this.pdfDocument ? this.pdfDocument.numPages : 0;
},
get page() {
return this.pdfViewer.currentPageNumber;
},
set page(value) {
this.pdfViewer.currentPageNumber = value;
},
navigateTo: function navigateTo(dest) {
}
}, {
key: 'navigateTo',
value: function navigateTo(dest) {
var _this = this;
var goToDestination = function goToDestination(_ref) {
var namedDest = _ref.namedDest,
explicitDest = _ref.explicitDest;
var goToDestination = function goToDestination(_ref2) {
var namedDest = _ref2.namedDest,
explicitDest = _ref2.explicitDest;
var destRef = explicitDest[0],
pageNumber = void 0;
@ -122,8 +129,10 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -122,8 +129,10 @@ var PDFLinkService = function PDFLinkServiceClosure() {
}
goToDestination(data);
});
},
getDestinationHash: function getDestinationHash(dest) {
}
}, {
key: 'getDestinationHash',
value: function getDestinationHash(dest) {
if (typeof dest === 'string') {
return this.getAnchorUrl('#' + escape(dest));
}
@ -132,13 +141,17 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -132,13 +141,17 @@ var PDFLinkService = function PDFLinkServiceClosure() {
return this.getAnchorUrl('#' + escape(str));
}
return this.getAnchorUrl('');
},
getAnchorUrl: function PDFLinkService_getAnchorUrl(anchor) {
}
}, {
key: 'getAnchorUrl',
value: function getAnchorUrl(anchor) {
return (this.baseUrl || '') + anchor;
},
setHash: function PDFLinkService_setHash(hash) {
var pageNumber, dest;
}
}, {
key: 'setHash',
value: function setHash(hash) {
var pageNumber = void 0,
dest = void 0;
if (hash.indexOf('=') >= 0) {
var params = (0, _ui_utils.parseQueryString)(hash);
if ('search' in params) {
@ -171,12 +184,12 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -171,12 +184,12 @@ var PDFLinkService = function PDFLinkServiceClosure() {
dest = [null, { name: zoomArg }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null];
} else if (zoomArg === 'FitR') {
if (zoomArgs.length !== 5) {
console.error('PDFLinkService_setHash: ' + 'Not enough parameters for \'FitR\'.');
console.error('PDFLinkService.setHash: Not enough parameters for "FitR".');
} else {
dest = [null, { name: zoomArg }, zoomArgs[1] | 0, zoomArgs[2] | 0, zoomArgs[3] | 0, zoomArgs[4] | 0];
}
} else {
console.error('PDFLinkService_setHash: \'' + zoomArg + '\' is not a valid zoom value.');
console.error('PDFLinkService.setHash: "' + zoomArg + '" is not ' + 'a valid zoom value.');
}
}
}
@ -197,7 +210,7 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -197,7 +210,7 @@ var PDFLinkService = function PDFLinkServiceClosure() {
}
} else {
if (/^\d+$/.test(hash) && hash <= this.pagesCount) {
console.warn('PDFLinkService_setHash: specifying a page number ' + 'directly after the hash symbol (#) is deprecated, ' + 'please use the "#page=' + hash + '" form instead.');
console.warn('PDFLinkService_setHash: specifying a page number ' + 'directly after the hash symbol (#) is deprecated, ' + ('please use the "#page=' + hash + '" form instead.'));
this.page = hash | 0;
}
dest = unescape(hash);
@ -214,10 +227,12 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -214,10 +227,12 @@ var PDFLinkService = function PDFLinkServiceClosure() {
this.navigateTo(dest);
return;
}
console.error('PDFLinkService_setHash: \'' + unescape(hash) + '\' is not a valid destination.');
console.error('PDFLinkService.setHash: "' + unescape(hash) + '" is not ' + 'a valid destination.');
}
},
executeNamedAction: function PDFLinkService_executeNamedAction(action) {
}
}, {
key: 'executeNamedAction',
value: function executeNamedAction(action) {
switch (action) {
case 'GoBack':
if (this.pdfHistory) {
@ -252,28 +267,52 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -252,28 +267,52 @@ var PDFLinkService = function PDFLinkServiceClosure() {
source: this,
action: action
});
},
onFileAttachmentAnnotation: function onFileAttachmentAnnotation() {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
}
}, {
key: 'onFileAttachmentAnnotation',
value: function onFileAttachmentAnnotation(_ref3) {
var id = _ref3.id,
filename = _ref3.filename,
content = _ref3.content;
this.eventBus.dispatch('fileattachmentannotation', {
source: this,
id: params.id,
filename: params.filename,
content: params.content
id: id,
filename: filename,
content: content
});
},
cachePageRef: function PDFLinkService_cachePageRef(pageNum, pageRef) {
}
}, {
key: 'cachePageRef',
value: function cachePageRef(pageNum, pageRef) {
var refStr = pageRef.num + ' ' + pageRef.gen + ' R';
this._pagesRefCache[refStr] = pageNum;
},
_cachedPageNumber: function PDFLinkService_cachedPageNumber(pageRef) {
}
}, {
key: '_cachedPageNumber',
value: function _cachedPageNumber(pageRef) {
var refStr = pageRef.num + ' ' + pageRef.gen + ' R';
return this._pagesRefCache && this._pagesRefCache[refStr] || null;
}
};
function isValidExplicitDestination(dest) {
}, {
key: 'pagesCount',
get: function get() {
return this.pdfDocument ? this.pdfDocument.numPages : 0;
}
}, {
key: 'page',
get: function get() {
return this.pdfViewer.currentPageNumber;
},
set: function set(value) {
this.pdfViewer.currentPageNumber = value;
}
}]);
return PDFLinkService;
}();
function isValidExplicitDestination(dest) {
if (!(dest instanceof Array)) {
return false;
}
@ -323,29 +362,52 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -323,29 +362,52 @@ var PDFLinkService = function PDFLinkServiceClosure() {
}
}
return true;
}
var SimpleLinkService = function () {
function SimpleLinkService() {
_classCallCheck(this, SimpleLinkService);
}
return PDFLinkService;
}();
var SimpleLinkService = function SimpleLinkServiceClosure() {
function SimpleLinkService() {}
SimpleLinkService.prototype = {
get page() {
return 0;
},
set page(value) {},
navigateTo: function navigateTo(dest) {},
getDestinationHash: function getDestinationHash(dest) {
_createClass(SimpleLinkService, [{
key: 'navigateTo',
value: function navigateTo(dest) {}
}, {
key: 'getDestinationHash',
value: function getDestinationHash(dest) {
return '#';
},
getAnchorUrl: function getAnchorUrl(hash) {
}
}, {
key: 'getAnchorUrl',
value: function getAnchorUrl(hash) {
return '#';
}
}, {
key: 'setHash',
value: function setHash(hash) {}
}, {
key: 'executeNamedAction',
value: function executeNamedAction(action) {}
}, {
key: 'onFileAttachmentAnnotation',
value: function onFileAttachmentAnnotation(_ref4) {
var id = _ref4.id,
filename = _ref4.filename,
content = _ref4.content;
}
}, {
key: 'cachePageRef',
value: function cachePageRef(pageNum, pageRef) {}
}, {
key: 'page',
get: function get() {
return 0;
},
setHash: function setHash(hash) {},
executeNamedAction: function executeNamedAction(action) {},
onFileAttachmentAnnotation: function onFileAttachmentAnnotation(params) {},
cachePageRef: function cachePageRef(pageNum, pageRef) {}
};
set: function set(value) {}
}]);
return SimpleLinkService;
}();
exports.PDFLinkService = PDFLinkService;
exports.SimpleLinkService = SimpleLinkService;

2
package.json

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

200
web/pdf_viewer.js

@ -720,47 +720,54 @@ exports.SimpleLinkService = exports.PDFLinkService = undefined; @@ -720,47 +720,54 @@ exports.SimpleLinkService = exports.PDFLinkService = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
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 _dom_events = __w_pdfjs_require__(2);
var _ui_utils = __w_pdfjs_require__(1);
var PDFLinkService = function PDFLinkServiceClosure() {
function PDFLinkService(options) {
options = options || {};
this.eventBus = options.eventBus || (0, _dom_events.getGlobalEventBus)();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var PDFLinkService = function () {
function PDFLinkService() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
eventBus = _ref.eventBus;
_classCallCheck(this, PDFLinkService);
this.eventBus = eventBus || (0, _dom_events.getGlobalEventBus)();
this.baseUrl = null;
this.pdfDocument = null;
this.pdfViewer = null;
this.pdfHistory = null;
this._pagesRefCache = null;
}
PDFLinkService.prototype = {
setDocument: function PDFLinkService_setDocument(pdfDocument, baseUrl) {
_createClass(PDFLinkService, [{
key: 'setDocument',
value: function setDocument(pdfDocument, baseUrl) {
this.baseUrl = baseUrl;
this.pdfDocument = pdfDocument;
this._pagesRefCache = Object.create(null);
},
setViewer: function PDFLinkService_setViewer(pdfViewer) {
}
}, {
key: 'setViewer',
value: function setViewer(pdfViewer) {
this.pdfViewer = pdfViewer;
},
setHistory: function PDFLinkService_setHistory(pdfHistory) {
}
}, {
key: 'setHistory',
value: function setHistory(pdfHistory) {
this.pdfHistory = pdfHistory;
},
get pagesCount() {
return this.pdfDocument ? this.pdfDocument.numPages : 0;
},
get page() {
return this.pdfViewer.currentPageNumber;
},
set page(value) {
this.pdfViewer.currentPageNumber = value;
},
navigateTo: function navigateTo(dest) {
}
}, {
key: 'navigateTo',
value: function navigateTo(dest) {
var _this = this;
var goToDestination = function goToDestination(_ref) {
var namedDest = _ref.namedDest,
explicitDest = _ref.explicitDest;
var goToDestination = function goToDestination(_ref2) {
var namedDest = _ref2.namedDest,
explicitDest = _ref2.explicitDest;
var destRef = explicitDest[0],
pageNumber = void 0;
@ -821,8 +828,10 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -821,8 +828,10 @@ var PDFLinkService = function PDFLinkServiceClosure() {
}
goToDestination(data);
});
},
getDestinationHash: function getDestinationHash(dest) {
}
}, {
key: 'getDestinationHash',
value: function getDestinationHash(dest) {
if (typeof dest === 'string') {
return this.getAnchorUrl('#' + escape(dest));
}
@ -831,13 +840,17 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -831,13 +840,17 @@ var PDFLinkService = function PDFLinkServiceClosure() {
return this.getAnchorUrl('#' + escape(str));
}
return this.getAnchorUrl('');
},
getAnchorUrl: function PDFLinkService_getAnchorUrl(anchor) {
}
}, {
key: 'getAnchorUrl',
value: function getAnchorUrl(anchor) {
return (this.baseUrl || '') + anchor;
},
setHash: function PDFLinkService_setHash(hash) {
var pageNumber, dest;
}
}, {
key: 'setHash',
value: function setHash(hash) {
var pageNumber = void 0,
dest = void 0;
if (hash.indexOf('=') >= 0) {
var params = (0, _ui_utils.parseQueryString)(hash);
if ('search' in params) {
@ -870,12 +883,12 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -870,12 +883,12 @@ var PDFLinkService = function PDFLinkServiceClosure() {
dest = [null, { name: zoomArg }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null];
} else if (zoomArg === 'FitR') {
if (zoomArgs.length !== 5) {
console.error('PDFLinkService_setHash: ' + 'Not enough parameters for \'FitR\'.');
console.error('PDFLinkService.setHash: Not enough parameters for "FitR".');
} else {
dest = [null, { name: zoomArg }, zoomArgs[1] | 0, zoomArgs[2] | 0, zoomArgs[3] | 0, zoomArgs[4] | 0];
}
} else {
console.error('PDFLinkService_setHash: \'' + zoomArg + '\' is not a valid zoom value.');
console.error('PDFLinkService.setHash: "' + zoomArg + '" is not ' + 'a valid zoom value.');
}
}
}
@ -896,7 +909,7 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -896,7 +909,7 @@ var PDFLinkService = function PDFLinkServiceClosure() {
}
} else {
if (/^\d+$/.test(hash) && hash <= this.pagesCount) {
console.warn('PDFLinkService_setHash: specifying a page number ' + 'directly after the hash symbol (#) is deprecated, ' + 'please use the "#page=' + hash + '" form instead.');
console.warn('PDFLinkService_setHash: specifying a page number ' + 'directly after the hash symbol (#) is deprecated, ' + ('please use the "#page=' + hash + '" form instead.'));
this.page = hash | 0;
}
dest = unescape(hash);
@ -913,10 +926,12 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -913,10 +926,12 @@ var PDFLinkService = function PDFLinkServiceClosure() {
this.navigateTo(dest);
return;
}
console.error('PDFLinkService_setHash: \'' + unescape(hash) + '\' is not a valid destination.');
console.error('PDFLinkService.setHash: "' + unescape(hash) + '" is not ' + 'a valid destination.');
}
},
executeNamedAction: function PDFLinkService_executeNamedAction(action) {
}
}, {
key: 'executeNamedAction',
value: function executeNamedAction(action) {
switch (action) {
case 'GoBack':
if (this.pdfHistory) {
@ -951,28 +966,52 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -951,28 +966,52 @@ var PDFLinkService = function PDFLinkServiceClosure() {
source: this,
action: action
});
},
onFileAttachmentAnnotation: function onFileAttachmentAnnotation() {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
}
}, {
key: 'onFileAttachmentAnnotation',
value: function onFileAttachmentAnnotation(_ref3) {
var id = _ref3.id,
filename = _ref3.filename,
content = _ref3.content;
this.eventBus.dispatch('fileattachmentannotation', {
source: this,
id: params.id,
filename: params.filename,
content: params.content
id: id,
filename: filename,
content: content
});
},
cachePageRef: function PDFLinkService_cachePageRef(pageNum, pageRef) {
}
}, {
key: 'cachePageRef',
value: function cachePageRef(pageNum, pageRef) {
var refStr = pageRef.num + ' ' + pageRef.gen + ' R';
this._pagesRefCache[refStr] = pageNum;
},
_cachedPageNumber: function PDFLinkService_cachedPageNumber(pageRef) {
}
}, {
key: '_cachedPageNumber',
value: function _cachedPageNumber(pageRef) {
var refStr = pageRef.num + ' ' + pageRef.gen + ' R';
return this._pagesRefCache && this._pagesRefCache[refStr] || null;
}
};
function isValidExplicitDestination(dest) {
}, {
key: 'pagesCount',
get: function get() {
return this.pdfDocument ? this.pdfDocument.numPages : 0;
}
}, {
key: 'page',
get: function get() {
return this.pdfViewer.currentPageNumber;
},
set: function set(value) {
this.pdfViewer.currentPageNumber = value;
}
}]);
return PDFLinkService;
}();
function isValidExplicitDestination(dest) {
if (!(dest instanceof Array)) {
return false;
}
@ -1022,30 +1061,53 @@ var PDFLinkService = function PDFLinkServiceClosure() { @@ -1022,30 +1061,53 @@ var PDFLinkService = function PDFLinkServiceClosure() {
}
}
return true;
}
var SimpleLinkService = function () {
function SimpleLinkService() {
_classCallCheck(this, SimpleLinkService);
}
return PDFLinkService;
}();
var SimpleLinkService = function SimpleLinkServiceClosure() {
function SimpleLinkService() {}
SimpleLinkService.prototype = {
get page() {
return 0;
},
set page(value) {},
navigateTo: function navigateTo(dest) {},
getDestinationHash: function getDestinationHash(dest) {
_createClass(SimpleLinkService, [{
key: 'navigateTo',
value: function navigateTo(dest) {}
}, {
key: 'getDestinationHash',
value: function getDestinationHash(dest) {
return '#';
},
getAnchorUrl: function getAnchorUrl(hash) {
}
}, {
key: 'getAnchorUrl',
value: function getAnchorUrl(hash) {
return '#';
}
}, {
key: 'setHash',
value: function setHash(hash) {}
}, {
key: 'executeNamedAction',
value: function executeNamedAction(action) {}
}, {
key: 'onFileAttachmentAnnotation',
value: function onFileAttachmentAnnotation(_ref4) {
var id = _ref4.id,
filename = _ref4.filename,
content = _ref4.content;
}
}, {
key: 'cachePageRef',
value: function cachePageRef(pageNum, pageRef) {}
}, {
key: 'page',
get: function get() {
return 0;
},
setHash: function setHash(hash) {},
executeNamedAction: function executeNamedAction(action) {},
onFileAttachmentAnnotation: function onFileAttachmentAnnotation(params) {},
cachePageRef: function cachePageRef(pageNum, pageRef) {}
};
set: function set(value) {}
}]);
return SimpleLinkService;
}();
exports.PDFLinkService = PDFLinkService;
exports.SimpleLinkService = SimpleLinkService;

2
web/pdf_viewer.js.map

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