Browse Source

PDF.js version 1.8.512 - See mozilla/pdf.js@05b1ef2d2380d699c9d66dcdd9b1af4dab699b91

master v1.8.512
pdfjsbot 8 years ago
parent
commit
8e767c6162
  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. 23
      lib/web/annotation_layer_builder.js
  14. 36
      lib/web/pdf_attachment_viewer.js
  15. 19
      lib/web/pdf_outline_viewer.js
  16. 19
      lib/web/pdf_presentation_mode.js
  17. 9
      lib/web/pdf_sidebar.js
  18. 2
      lib/web/view_history.js
  19. 2
      package.json
  20. 23
      web/pdf_viewer.js
  21. 2
      web/pdf_viewer.js.map

2
bower.json

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

12
build/pdf.combined.js

@ -13125,8 +13125,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '1.8.510'; exports.version = version = '1.8.512';
exports.build = build = '9f5c1550'; exports.build = build = '05b1ef2d';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;
@ -28631,8 +28631,8 @@ if (!_util.globalScope.PDFJS) {
} }
var PDFJS = _util.globalScope.PDFJS; var PDFJS = _util.globalScope.PDFJS;
{ {
PDFJS.version = '1.8.510'; PDFJS.version = '1.8.512';
PDFJS.build = '9f5c1550'; PDFJS.build = '05b1ef2d';
} }
PDFJS.pdfBug = false; PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) { if (PDFJS.verbosity !== undefined) {
@ -47254,8 +47254,8 @@ exports.TilingPattern = TilingPattern;
"use strict"; "use strict";
var pdfjsVersion = '1.8.510'; var pdfjsVersion = '1.8.512';
var pdfjsBuild = '9f5c1550'; var pdfjsBuild = '05b1ef2d';
var pdfjsSharedUtil = __w_pdfjs_require__(0); var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(26); var pdfjsDisplayGlobal = __w_pdfjs_require__(26);
var pdfjsDisplayAPI = __w_pdfjs_require__(10); 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

@ -3854,8 +3854,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '1.8.510'; exports.version = version = '1.8.512';
exports.build = build = '9f5c1550'; exports.build = build = '05b1ef2d';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;
@ -5912,8 +5912,8 @@ if (!_util.globalScope.PDFJS) {
} }
var PDFJS = _util.globalScope.PDFJS; var PDFJS = _util.globalScope.PDFJS;
{ {
PDFJS.version = '1.8.510'; PDFJS.version = '1.8.512';
PDFJS.build = '9f5c1550'; PDFJS.build = '05b1ef2d';
} }
PDFJS.pdfBug = false; PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) { if (PDFJS.verbosity !== undefined) {
@ -11452,8 +11452,8 @@ exports.TilingPattern = TilingPattern;
"use strict"; "use strict";
var pdfjsVersion = '1.8.510'; var pdfjsVersion = '1.8.512';
var pdfjsBuild = '9f5c1550'; var pdfjsBuild = '05b1ef2d';
var pdfjsSharedUtil = __w_pdfjs_require__(0); var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(9); var pdfjsDisplayGlobal = __w_pdfjs_require__(9);
var pdfjsDisplayAPI = __w_pdfjs_require__(3); 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

@ -40407,8 +40407,8 @@ exports.Type1Parser = Type1Parser;
"use strict"; "use strict";
var pdfjsVersion = '1.8.510'; var pdfjsVersion = '1.8.512';
var pdfjsBuild = '9f5c1550'; var pdfjsBuild = '05b1ef2d';
var pdfjsCoreWorker = __w_pdfjs_require__(8); var pdfjsCoreWorker = __w_pdfjs_require__(8);
{ {
__w_pdfjs_require__(19); __w_pdfjs_require__(19);

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() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '1.8.510'; exports.version = version = '1.8.512';
exports.build = build = '9f5c1550'; exports.build = build = '05b1ef2d';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;

4
lib/display/global.js

@ -39,8 +39,8 @@ if (!_util.globalScope.PDFJS) {
} }
var PDFJS = _util.globalScope.PDFJS; var PDFJS = _util.globalScope.PDFJS;
{ {
PDFJS.version = '1.8.510'; PDFJS.version = '1.8.512';
PDFJS.build = '9f5c1550'; PDFJS.build = '05b1ef2d';
} }
PDFJS.pdfBug = false; PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) { if (PDFJS.verbosity !== undefined) {

4
lib/pdf.js

@ -14,8 +14,8 @@
*/ */
'use strict'; 'use strict';
var pdfjsVersion = '1.8.510'; var pdfjsVersion = '1.8.512';
var pdfjsBuild = '9f5c1550'; var pdfjsBuild = '05b1ef2d';
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

@ -14,8 +14,8 @@
*/ */
'use strict'; 'use strict';
var pdfjsVersion = '1.8.510'; var pdfjsVersion = '1.8.512';
var pdfjsBuild = '9f5c1550'; var pdfjsBuild = '05b1ef2d';
var pdfjsCoreWorker = require('./core/worker.js'); var pdfjsCoreWorker = require('./core/worker.js');
{ {
require('./core/network.js'); require('./core/network.js');

23
lib/web/annotation_layer_builder.js

@ -30,15 +30,24 @@ var _pdf_link_service = require('./pdf_link_service');
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var AnnotationLayerBuilder = function () { var AnnotationLayerBuilder = function () {
function AnnotationLayerBuilder(options) { function AnnotationLayerBuilder(_ref) {
var pageDiv = _ref.pageDiv,
pdfPage = _ref.pdfPage,
linkService = _ref.linkService,
downloadManager = _ref.downloadManager,
_ref$renderInteractiv = _ref.renderInteractiveForms,
renderInteractiveForms = _ref$renderInteractiv === undefined ? false : _ref$renderInteractiv,
_ref$l10n = _ref.l10n,
l10n = _ref$l10n === undefined ? _ui_utils.NullL10n : _ref$l10n;
_classCallCheck(this, AnnotationLayerBuilder); _classCallCheck(this, AnnotationLayerBuilder);
this.pageDiv = options.pageDiv; this.pageDiv = pageDiv;
this.pdfPage = options.pdfPage; this.pdfPage = pdfPage;
this.renderInteractiveForms = options.renderInteractiveForms; this.linkService = linkService;
this.linkService = options.linkService; this.downloadManager = downloadManager;
this.downloadManager = options.downloadManager; this.renderInteractiveForms = renderInteractiveForms;
this.l10n = options.l10n || _ui_utils.NullL10n; this.l10n = l10n;
this.div = null; this.div = null;
} }

36
lib/web/pdf_attachment_viewer.js

@ -26,13 +26,17 @@ var _pdf = require('../pdf');
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var PDFAttachmentViewer = function () { var PDFAttachmentViewer = function () {
function PDFAttachmentViewer(options) { function PDFAttachmentViewer(_ref) {
var container = _ref.container,
eventBus = _ref.eventBus,
downloadManager = _ref.downloadManager;
_classCallCheck(this, PDFAttachmentViewer); _classCallCheck(this, PDFAttachmentViewer);
this.attachments = null; this.attachments = null;
this.container = options.container; this.container = container;
this.eventBus = options.eventBus; this.eventBus = eventBus;
this.downloadManager = options.downloadManager; this.downloadManager = downloadManager;
this._renderedCapability = (0, _pdf.createPromiseCapability)(); this._renderedCapability = (0, _pdf.createPromiseCapability)();
this.eventBus.on('fileattachmentannotation', this._appendAttachment.bind(this)); this.eventBus.on('fileattachmentannotation', this._appendAttachment.bind(this));
} }
@ -63,12 +67,12 @@ var PDFAttachmentViewer = function () {
if (_pdf.PDFJS.disableCreateObjectURL) { if (_pdf.PDFJS.disableCreateObjectURL) {
throw new Error('bindPdfLink: ' + 'Unsupported "PDFJS.disableCreateObjectURL" value.'); throw new Error('bindPdfLink: ' + 'Unsupported "PDFJS.disableCreateObjectURL" value.');
} }
var blobUrl; var blobUrl = void 0;
button.onclick = function () { button.onclick = function () {
if (!blobUrl) { if (!blobUrl) {
blobUrl = (0, _pdf.createObjectURL)(content, 'application/pdf'); blobUrl = (0, _pdf.createObjectURL)(content, 'application/pdf');
} }
var viewerUrl; var viewerUrl = void 0;
viewerUrl = '?file=' + encodeURIComponent(blobUrl + '#' + filename); viewerUrl = '?file=' + encodeURIComponent(blobUrl + '#' + filename);
window.open(viewerUrl); window.open(viewerUrl);
return false; return false;
@ -86,16 +90,16 @@ var PDFAttachmentViewer = function () {
} }
}, { }, {
key: 'render', key: 'render',
value: function render() { value: function render(_ref2) {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var attachments = _ref2.attachments,
_ref2$keepRenderedCap = _ref2.keepRenderedCapability,
keepRenderedCapability = _ref2$keepRenderedCap === undefined ? false : _ref2$keepRenderedCap;
var attachments = params.attachments || null;
var attachmentsCount = 0; var attachmentsCount = 0;
if (this.attachments) { if (this.attachments) {
var keepRenderedCapability = params.keepRenderedCapability === true; this.reset(keepRenderedCapability === true);
this.reset(keepRenderedCapability);
} }
this.attachments = attachments; this.attachments = attachments || null;
if (!attachments) { if (!attachments) {
this._dispatchEvent(attachmentsCount); this._dispatchEvent(attachmentsCount);
return; return;
@ -123,12 +127,12 @@ var PDFAttachmentViewer = function () {
} }
}, { }, {
key: '_appendAttachment', key: '_appendAttachment',
value: function _appendAttachment(_ref) { value: function _appendAttachment(_ref3) {
var _this2 = this; var _this2 = this;
var id = _ref.id, var id = _ref3.id,
filename = _ref.filename, filename = _ref3.filename,
content = _ref.content; content = _ref3.content;
this._renderedCapability.promise.then(function () { this._renderedCapability.promise.then(function () {
var attachments = _this2.attachments; var attachments = _this2.attachments;

19
lib/web/pdf_outline_viewer.js

@ -28,14 +28,18 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var DEFAULT_TITLE = '\u2013'; var DEFAULT_TITLE = '\u2013';
var PDFOutlineViewer = function () { var PDFOutlineViewer = function () {
function PDFOutlineViewer(options) { function PDFOutlineViewer(_ref) {
var container = _ref.container,
linkService = _ref.linkService,
eventBus = _ref.eventBus;
_classCallCheck(this, PDFOutlineViewer); _classCallCheck(this, PDFOutlineViewer);
this.outline = null; this.outline = null;
this.lastToggleIsShow = true; this.lastToggleIsShow = true;
this.container = options.container; this.container = container;
this.linkService = options.linkService; this.linkService = linkService;
this.eventBus = options.eventBus; this.eventBus = eventBus;
} }
_createClass(PDFOutlineViewer, [{ _createClass(PDFOutlineViewer, [{
@ -125,15 +129,14 @@ var PDFOutlineViewer = function () {
} }
}, { }, {
key: 'render', key: 'render',
value: function render() { value: function render(_ref2) {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var outline = _ref2.outline;
var outline = params.outline || null;
var outlineCount = 0; var outlineCount = 0;
if (this.outline) { if (this.outline) {
this.reset(); this.reset();
} }
this.outline = outline; this.outline = outline || null;
if (!outline) { if (!outline) {
this._dispatchEvent(outlineCount); this._dispatchEvent(outlineCount);
return; return;

19
lib/web/pdf_presentation_mode.js

@ -35,16 +35,23 @@ var SWIPE_MIN_DISTANCE_THRESHOLD = 50;
var SWIPE_ANGLE_THRESHOLD = Math.PI / 6; var SWIPE_ANGLE_THRESHOLD = Math.PI / 6;
var PDFPresentationMode = function () { var PDFPresentationMode = function () {
function PDFPresentationMode(options) { function PDFPresentationMode(_ref) {
var _this = this; var _this = this;
var container = _ref.container,
_ref$viewer = _ref.viewer,
viewer = _ref$viewer === undefined ? null : _ref$viewer,
pdfViewer = _ref.pdfViewer,
eventBus = _ref.eventBus,
_ref$contextMenuItems = _ref.contextMenuItems,
contextMenuItems = _ref$contextMenuItems === undefined ? null : _ref$contextMenuItems;
_classCallCheck(this, PDFPresentationMode); _classCallCheck(this, PDFPresentationMode);
this.container = options.container; this.container = container;
this.viewer = options.viewer || options.container.firstElementChild; this.viewer = viewer || container.firstElementChild;
this.pdfViewer = options.pdfViewer; this.pdfViewer = pdfViewer;
this.eventBus = options.eventBus; this.eventBus = eventBus;
var contextMenuItems = options.contextMenuItems || null;
this.active = false; this.active = false;
this.args = null; this.args = null;
this.contextMenuOpen = false; this.contextMenuOpen = false;

9
lib/web/pdf_sidebar.js

@ -212,17 +212,18 @@ var PDFSidebar = function () {
}, { }, {
key: '_updateThumbnailViewer', key: '_updateThumbnailViewer',
value: function _updateThumbnailViewer() { value: function _updateThumbnailViewer() {
var pdfViewer = this.pdfViewer; var pdfViewer = this.pdfViewer,
var thumbnailViewer = this.pdfThumbnailViewer; pdfThumbnailViewer = this.pdfThumbnailViewer;
var pagesCount = pdfViewer.pagesCount; var pagesCount = pdfViewer.pagesCount;
for (var pageIndex = 0; pageIndex < pagesCount; pageIndex++) { for (var pageIndex = 0; pageIndex < pagesCount; pageIndex++) {
var pageView = pdfViewer.getPageView(pageIndex); var pageView = pdfViewer.getPageView(pageIndex);
if (pageView && pageView.renderingState === _pdf_rendering_queue.RenderingStates.FINISHED) { if (pageView && pageView.renderingState === _pdf_rendering_queue.RenderingStates.FINISHED) {
var thumbnailView = thumbnailViewer.getThumbnail(pageIndex); var thumbnailView = pdfThumbnailViewer.getThumbnail(pageIndex);
thumbnailView.setImage(pageView); thumbnailView.setImage(pageView);
} }
} }
thumbnailViewer.scrollThumbnailIntoView(pdfViewer.currentPageNumber); pdfThumbnailViewer.scrollThumbnailIntoView(pdfViewer.currentPageNumber);
} }
}, { }, {
key: '_showUINotification', key: '_showUINotification',

2
lib/web/view_history.js

@ -42,7 +42,7 @@ var ViewHistory = function () {
if (database.files.length >= _this.cacheSize) { if (database.files.length >= _this.cacheSize) {
database.files.shift(); database.files.shift();
} }
var index; var index = void 0;
for (var i = 0, length = database.files.length; i < length; i++) { for (var i = 0, length = database.files.length; i < length; i++) {
var branch = database.files[i]; var branch = database.files[i];
if (branch.fingerprint === _this.fingerprint) { if (branch.fingerprint === _this.fingerprint) {

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.8.510", "version": "1.8.512",
"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": [

23
web/pdf_viewer.js

@ -1076,15 +1076,24 @@ var _pdf_link_service = __w_pdfjs_require__(3);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var AnnotationLayerBuilder = function () { var AnnotationLayerBuilder = function () {
function AnnotationLayerBuilder(options) { function AnnotationLayerBuilder(_ref) {
var pageDiv = _ref.pageDiv,
pdfPage = _ref.pdfPage,
linkService = _ref.linkService,
downloadManager = _ref.downloadManager,
_ref$renderInteractiv = _ref.renderInteractiveForms,
renderInteractiveForms = _ref$renderInteractiv === undefined ? false : _ref$renderInteractiv,
_ref$l10n = _ref.l10n,
l10n = _ref$l10n === undefined ? _ui_utils.NullL10n : _ref$l10n;
_classCallCheck(this, AnnotationLayerBuilder); _classCallCheck(this, AnnotationLayerBuilder);
this.pageDiv = options.pageDiv; this.pageDiv = pageDiv;
this.pdfPage = options.pdfPage; this.pdfPage = pdfPage;
this.renderInteractiveForms = options.renderInteractiveForms; this.linkService = linkService;
this.linkService = options.linkService; this.downloadManager = downloadManager;
this.downloadManager = options.downloadManager; this.renderInteractiveForms = renderInteractiveForms;
this.l10n = options.l10n || _ui_utils.NullL10n; this.l10n = l10n;
this.div = null; this.div = null;
} }

2
web/pdf_viewer.js.map

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