Browse Source

PDF.js version 1.8.355 - See mozilla/pdf.js@e9cbfbccb47135c4bc930267d75935d3db15abc7

master v1.8.355
pdfjsbot 8 years ago
parent
commit
b982be863b
  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
      build/pdf.worker.min.js
  10. 4
      lib/display/api.js
  11. 4
      lib/display/global.js
  12. 4
      lib/pdf.js
  13. 4
      lib/pdf.worker.js
  14. 63
      lib/web/pdf_page_view.js
  15. 34
      lib/web/pdf_thumbnail_view.js
  16. 2
      package.json
  17. 63
      web/pdf_viewer.js
  18. 2
      web/pdf_viewer.js.map

2
bower.json

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

12
build/pdf.combined.js

@ -12822,8 +12822,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '1.8.353'; exports.version = version = '1.8.355';
exports.build = build = '08f8b68f'; exports.build = build = 'e9cbfbcc';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;
@ -28229,8 +28229,8 @@ if (!_util.globalScope.PDFJS) {
} }
var PDFJS = _util.globalScope.PDFJS; var PDFJS = _util.globalScope.PDFJS;
{ {
PDFJS.version = '1.8.353'; PDFJS.version = '1.8.355';
PDFJS.build = '08f8b68f'; PDFJS.build = 'e9cbfbcc';
} }
PDFJS.pdfBug = false; PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) { if (PDFJS.verbosity !== undefined) {
@ -43816,8 +43816,8 @@ exports.TilingPattern = TilingPattern;
"use strict"; "use strict";
var pdfjsVersion = '1.8.353'; var pdfjsVersion = '1.8.355';
var pdfjsBuild = '08f8b68f'; var pdfjsBuild = 'e9cbfbcc';
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

@ -3530,8 +3530,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '1.8.353'; exports.version = version = '1.8.355';
exports.build = build = '08f8b68f'; exports.build = build = 'e9cbfbcc';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;
@ -5504,8 +5504,8 @@ if (!_util.globalScope.PDFJS) {
} }
var PDFJS = _util.globalScope.PDFJS; var PDFJS = _util.globalScope.PDFJS;
{ {
PDFJS.version = '1.8.353'; PDFJS.version = '1.8.355';
PDFJS.build = '08f8b68f'; PDFJS.build = 'e9cbfbcc';
} }
PDFJS.pdfBug = false; PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) { if (PDFJS.verbosity !== undefined) {
@ -8000,8 +8000,8 @@ exports.TilingPattern = TilingPattern;
"use strict"; "use strict";
var pdfjsVersion = '1.8.353'; var pdfjsVersion = '1.8.355';
var pdfjsBuild = '08f8b68f'; var pdfjsBuild = 'e9cbfbcc';
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

@ -37144,8 +37144,8 @@ exports.Type1Parser = Type1Parser;
"use strict"; "use strict";
var pdfjsVersion = '1.8.353'; var pdfjsVersion = '1.8.355';
var pdfjsBuild = '08f8b68f'; var pdfjsBuild = 'e9cbfbcc';
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
build/pdf.worker.min.js vendored

File diff suppressed because one or more lines are too long

4
lib/display/api.js

@ -1413,8 +1413,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '1.8.353'; exports.version = version = '1.8.355';
exports.build = build = '08f8b68f'; exports.build = build = 'e9cbfbcc';
} }
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.353'; PDFJS.version = '1.8.355';
PDFJS.build = '08f8b68f'; PDFJS.build = 'e9cbfbcc';
} }
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.353'; var pdfjsVersion = '1.8.355';
var pdfjsBuild = '08f8b68f'; var pdfjsBuild = 'e9cbfbcc';
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.353'; var pdfjsVersion = '1.8.355';
var pdfjsBuild = '08f8b68f'; var pdfjsBuild = 'e9cbfbcc';
var pdfjsCoreWorker = require('./core/worker.js'); var pdfjsCoreWorker = require('./core/worker.js');
{ {
require('./core/network.js'); require('./core/network.js');

63
lib/web/pdf_page_view.js

@ -266,13 +266,14 @@ var PDFPageView = function PDFPageViewClosure() {
getPagePoint: function PDFPageView_getPagePoint(x, y) { getPagePoint: function PDFPageView_getPagePoint(x, y) {
return this.viewport.convertToPdfPoint(x, y); return this.viewport.convertToPdfPoint(x, y);
}, },
draw: function PDFPageView_draw() { draw: function draw() {
var _this = this;
if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
console.error('Must be in new state before drawing'); console.error('Must be in new state before drawing');
this.reset(); this.reset();
} }
this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING;
var self = this;
var pdfPage = this.pdfPage; var pdfPage = this.pdfPage;
var div = this.div; var div = this.div;
var canvasWrapper = document.createElement('div'); var canvasWrapper = document.createElement('div');
@ -284,10 +285,9 @@ var PDFPageView = function PDFPageViewClosure() {
} else { } else {
div.appendChild(canvasWrapper); div.appendChild(canvasWrapper);
} }
var textLayerDiv = null;
var textLayer = null; var textLayer = null;
if (this.textLayerFactory) { if (this.textLayerFactory) {
textLayerDiv = document.createElement('div'); var textLayerDiv = document.createElement('div');
textLayerDiv.className = 'textLayer'; textLayerDiv.className = 'textLayer';
textLayerDiv.style.width = canvasWrapper.style.width; textLayerDiv.style.width = canvasWrapper.style.width;
textLayerDiv.style.height = canvasWrapper.style.height; textLayerDiv.style.height = canvasWrapper.style.height;
@ -302,10 +302,10 @@ var PDFPageView = function PDFPageViewClosure() {
var renderContinueCallback = null; var renderContinueCallback = null;
if (this.renderingQueue) { if (this.renderingQueue) {
renderContinueCallback = function renderContinueCallback(cont) { renderContinueCallback = function renderContinueCallback(cont) {
if (!self.renderingQueue.isHighestPriority(self)) { if (!_this.renderingQueue.isHighestPriority(_this)) {
self.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED; _this.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED;
self.resume = function resumeCallback() { _this.resume = function () {
self.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; _this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING;
cont(); cont();
}; };
return; return;
@ -314,27 +314,27 @@ var PDFPageView = function PDFPageViewClosure() {
}; };
} }
var finishPaintTask = function finishPaintTask(error) { var finishPaintTask = function finishPaintTask(error) {
if (paintTask === self.paintTask) { if (paintTask === _this.paintTask) {
self.paintTask = null; _this.paintTask = null;
} }
if (error === 'cancelled' || error instanceof _pdfjs.RenderingCancelledException) { if (error === 'cancelled' || error instanceof _pdfjs.RenderingCancelledException) {
self.error = null; _this.error = null;
return Promise.resolve(undefined); return Promise.resolve(undefined);
} }
self.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; _this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED;
if (self.loadingIconDiv) { if (_this.loadingIconDiv) {
div.removeChild(self.loadingIconDiv); div.removeChild(_this.loadingIconDiv);
delete self.loadingIconDiv; delete _this.loadingIconDiv;
} }
self._resetZoomLayer(true); _this._resetZoomLayer(true);
self.error = error; _this.error = error;
self.stats = pdfPage.stats; _this.stats = pdfPage.stats;
if (self.onAfterDraw) { if (_this.onAfterDraw) {
self.onAfterDraw(); _this.onAfterDraw();
} }
self.eventBus.dispatch('pagerendered', { _this.eventBus.dispatch('pagerendered', {
source: self, source: _this,
pageNumber: self.id, pageNumber: _this.id,
cssTransform: false cssTransform: false
}); });
if (error) { if (error) {
@ -438,28 +438,28 @@ var PDFPageView = function PDFPageViewClosure() {
cont(); cont();
} }
}; };
renderTask.promise.then(function pdfPageRenderCallback() { renderTask.promise.then(function () {
showCanvas(); showCanvas();
renderCapability.resolve(undefined); renderCapability.resolve(undefined);
}, function pdfPageRenderError(error) { }, function (error) {
showCanvas(); showCanvas();
renderCapability.reject(error); renderCapability.reject(error);
}); });
return result; return result;
}, },
paintOnSvg: function paintOnSvg(wrapper) {
var _this2 = this;
paintOnSvg: function PDFPageView_paintOnSvg(wrapper) {
var cancelled = false; var cancelled = false;
var ensureNotCancelled = function ensureNotCancelled() { var ensureNotCancelled = function ensureNotCancelled() {
if (cancelled) { if (cancelled) {
if (_pdfjs.PDFJS.pdfjsNext) { if (_pdfjs.PDFJS.pdfjsNext) {
throw new _pdfjs.RenderingCancelledException('Rendering cancelled, page ' + self.id, 'svg'); throw new _pdfjs.RenderingCancelledException('Rendering cancelled, page ' + _this2.id, 'svg');
} else { } else {
throw 'cancelled'; throw 'cancelled';
} }
} }
}; };
var self = this;
var pdfPage = this.pdfPage; var pdfPage = this.pdfPage;
var actualSizeViewport = this.viewport.clone({ scale: _ui_utils.CSS_UNITS }); var actualSizeViewport = this.viewport.clone({ scale: _ui_utils.CSS_UNITS });
var promise = pdfPage.getOperatorList().then(function (opList) { var promise = pdfPage.getOperatorList().then(function (opList) {
@ -467,11 +467,11 @@ var PDFPageView = function PDFPageViewClosure() {
var svgGfx = new _pdfjs.SVGGraphics(pdfPage.commonObjs, pdfPage.objs); var svgGfx = new _pdfjs.SVGGraphics(pdfPage.commonObjs, pdfPage.objs);
return svgGfx.getSVG(opList, actualSizeViewport).then(function (svg) { return svgGfx.getSVG(opList, actualSizeViewport).then(function (svg) {
ensureNotCancelled(); ensureNotCancelled();
self.svg = svg; _this2.svg = svg;
self.paintedViewportMap.set(svg, actualSizeViewport); _this2.paintedViewportMap.set(svg, actualSizeViewport);
svg.style.width = wrapper.style.width; svg.style.width = wrapper.style.width;
svg.style.height = wrapper.style.height; svg.style.height = wrapper.style.height;
self.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; _this2.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED;
wrapper.appendChild(svg); wrapper.appendChild(svg);
}); });
}); });
@ -485,6 +485,7 @@ var PDFPageView = function PDFPageViewClosure() {
} }
}; };
}, },
setPageLabel: function PDFView_setPageLabel(label) { setPageLabel: function PDFView_setPageLabel(label) {
this.pageLabel = typeof label === 'string' ? label : null; this.pageLabel = typeof label === 'string' ? label : null;
if (this.pageLabel !== null) { if (this.pageLabel !== null) {

34
lib/web/pdf_thumbnail_view.js

@ -195,37 +195,38 @@ var PDFThumbnailView = function PDFThumbnailViewClosure() {
this.canvas.height = 0; this.canvas.height = 0;
delete this.canvas; delete this.canvas;
}, },
draw: function PDFThumbnailView_draw() { draw: function draw() {
var _this = this;
if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
console.error('Must be in new state before drawing'); console.error('Must be in new state before drawing');
return Promise.resolve(undefined); return Promise.resolve(undefined);
} }
this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING;
var renderCapability = (0, _pdfjs.createPromiseCapability)(); var renderCapability = (0, _pdfjs.createPromiseCapability)();
var self = this; var finishRenderTask = function finishRenderTask(error) {
function thumbnailDrawCallback(error) { if (renderTask === _this.renderTask) {
if (renderTask === self.renderTask) { _this.renderTask = null;
self.renderTask = null;
} }
if (error === 'cancelled' || error instanceof _pdfjs.RenderingCancelledException) { if (error === 'cancelled' || error instanceof _pdfjs.RenderingCancelledException) {
renderCapability.resolve(undefined); renderCapability.resolve(undefined);
return; return;
} }
self.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; _this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED;
self._convertCanvasToImage(); _this._convertCanvasToImage();
if (!error) { if (!error) {
renderCapability.resolve(undefined); renderCapability.resolve(undefined);
} else { } else {
renderCapability.reject(error); renderCapability.reject(error);
} }
} };
var ctx = this._getPageDrawContext(); var ctx = this._getPageDrawContext();
var drawViewport = this.viewport.clone({ scale: this.scale }); var drawViewport = this.viewport.clone({ scale: this.scale });
var renderContinueCallback = function renderContinueCallback(cont) { var renderContinueCallback = function renderContinueCallback(cont) {
if (!self.renderingQueue.isHighestPriority(self)) { if (!_this.renderingQueue.isHighestPriority(_this)) {
self.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED; _this.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED;
self.resume = function resumeCallback() { _this.resume = function () {
self.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; _this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING;
cont(); cont();
}; };
return; return;
@ -238,13 +239,14 @@ var PDFThumbnailView = function PDFThumbnailViewClosure() {
}; };
var renderTask = this.renderTask = this.pdfPage.render(renderContext); var renderTask = this.renderTask = this.pdfPage.render(renderContext);
renderTask.onContinue = renderContinueCallback; renderTask.onContinue = renderContinueCallback;
renderTask.promise.then(function pdfPageRenderCallback() { renderTask.promise.then(function () {
thumbnailDrawCallback(null); finishRenderTask(null);
}, function pdfPageRenderError(error) { }, function (error) {
thumbnailDrawCallback(error); finishRenderTask(error);
}); });
return renderCapability.promise; return renderCapability.promise;
}, },
setImage: function PDFThumbnailView_setImage(pageView) { setImage: function PDFThumbnailView_setImage(pageView) {
if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
return; return;

2
package.json

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

63
web/pdf_viewer.js

@ -1362,13 +1362,14 @@ var PDFPageView = function PDFPageViewClosure() {
getPagePoint: function PDFPageView_getPagePoint(x, y) { getPagePoint: function PDFPageView_getPagePoint(x, y) {
return this.viewport.convertToPdfPoint(x, y); return this.viewport.convertToPdfPoint(x, y);
}, },
draw: function PDFPageView_draw() { draw: function draw() {
var _this = this;
if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
console.error('Must be in new state before drawing'); console.error('Must be in new state before drawing');
this.reset(); this.reset();
} }
this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING;
var self = this;
var pdfPage = this.pdfPage; var pdfPage = this.pdfPage;
var div = this.div; var div = this.div;
var canvasWrapper = document.createElement('div'); var canvasWrapper = document.createElement('div');
@ -1380,10 +1381,9 @@ var PDFPageView = function PDFPageViewClosure() {
} else { } else {
div.appendChild(canvasWrapper); div.appendChild(canvasWrapper);
} }
var textLayerDiv = null;
var textLayer = null; var textLayer = null;
if (this.textLayerFactory) { if (this.textLayerFactory) {
textLayerDiv = document.createElement('div'); var textLayerDiv = document.createElement('div');
textLayerDiv.className = 'textLayer'; textLayerDiv.className = 'textLayer';
textLayerDiv.style.width = canvasWrapper.style.width; textLayerDiv.style.width = canvasWrapper.style.width;
textLayerDiv.style.height = canvasWrapper.style.height; textLayerDiv.style.height = canvasWrapper.style.height;
@ -1398,10 +1398,10 @@ var PDFPageView = function PDFPageViewClosure() {
var renderContinueCallback = null; var renderContinueCallback = null;
if (this.renderingQueue) { if (this.renderingQueue) {
renderContinueCallback = function renderContinueCallback(cont) { renderContinueCallback = function renderContinueCallback(cont) {
if (!self.renderingQueue.isHighestPriority(self)) { if (!_this.renderingQueue.isHighestPriority(_this)) {
self.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED; _this.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED;
self.resume = function resumeCallback() { _this.resume = function () {
self.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; _this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING;
cont(); cont();
}; };
return; return;
@ -1410,27 +1410,27 @@ var PDFPageView = function PDFPageViewClosure() {
}; };
} }
var finishPaintTask = function finishPaintTask(error) { var finishPaintTask = function finishPaintTask(error) {
if (paintTask === self.paintTask) { if (paintTask === _this.paintTask) {
self.paintTask = null; _this.paintTask = null;
} }
if (error === 'cancelled' || error instanceof _pdfjs.RenderingCancelledException) { if (error === 'cancelled' || error instanceof _pdfjs.RenderingCancelledException) {
self.error = null; _this.error = null;
return Promise.resolve(undefined); return Promise.resolve(undefined);
} }
self.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; _this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED;
if (self.loadingIconDiv) { if (_this.loadingIconDiv) {
div.removeChild(self.loadingIconDiv); div.removeChild(_this.loadingIconDiv);
delete self.loadingIconDiv; delete _this.loadingIconDiv;
} }
self._resetZoomLayer(true); _this._resetZoomLayer(true);
self.error = error; _this.error = error;
self.stats = pdfPage.stats; _this.stats = pdfPage.stats;
if (self.onAfterDraw) { if (_this.onAfterDraw) {
self.onAfterDraw(); _this.onAfterDraw();
} }
self.eventBus.dispatch('pagerendered', { _this.eventBus.dispatch('pagerendered', {
source: self, source: _this,
pageNumber: self.id, pageNumber: _this.id,
cssTransform: false cssTransform: false
}); });
if (error) { if (error) {
@ -1534,28 +1534,28 @@ var PDFPageView = function PDFPageViewClosure() {
cont(); cont();
} }
}; };
renderTask.promise.then(function pdfPageRenderCallback() { renderTask.promise.then(function () {
showCanvas(); showCanvas();
renderCapability.resolve(undefined); renderCapability.resolve(undefined);
}, function pdfPageRenderError(error) { }, function (error) {
showCanvas(); showCanvas();
renderCapability.reject(error); renderCapability.reject(error);
}); });
return result; return result;
}, },
paintOnSvg: function paintOnSvg(wrapper) {
var _this2 = this;
paintOnSvg: function PDFPageView_paintOnSvg(wrapper) {
var cancelled = false; var cancelled = false;
var ensureNotCancelled = function ensureNotCancelled() { var ensureNotCancelled = function ensureNotCancelled() {
if (cancelled) { if (cancelled) {
if (_pdfjs.PDFJS.pdfjsNext) { if (_pdfjs.PDFJS.pdfjsNext) {
throw new _pdfjs.RenderingCancelledException('Rendering cancelled, page ' + self.id, 'svg'); throw new _pdfjs.RenderingCancelledException('Rendering cancelled, page ' + _this2.id, 'svg');
} else { } else {
throw 'cancelled'; throw 'cancelled';
} }
} }
}; };
var self = this;
var pdfPage = this.pdfPage; var pdfPage = this.pdfPage;
var actualSizeViewport = this.viewport.clone({ scale: _ui_utils.CSS_UNITS }); var actualSizeViewport = this.viewport.clone({ scale: _ui_utils.CSS_UNITS });
var promise = pdfPage.getOperatorList().then(function (opList) { var promise = pdfPage.getOperatorList().then(function (opList) {
@ -1563,11 +1563,11 @@ var PDFPageView = function PDFPageViewClosure() {
var svgGfx = new _pdfjs.SVGGraphics(pdfPage.commonObjs, pdfPage.objs); var svgGfx = new _pdfjs.SVGGraphics(pdfPage.commonObjs, pdfPage.objs);
return svgGfx.getSVG(opList, actualSizeViewport).then(function (svg) { return svgGfx.getSVG(opList, actualSizeViewport).then(function (svg) {
ensureNotCancelled(); ensureNotCancelled();
self.svg = svg; _this2.svg = svg;
self.paintedViewportMap.set(svg, actualSizeViewport); _this2.paintedViewportMap.set(svg, actualSizeViewport);
svg.style.width = wrapper.style.width; svg.style.width = wrapper.style.width;
svg.style.height = wrapper.style.height; svg.style.height = wrapper.style.height;
self.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; _this2.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED;
wrapper.appendChild(svg); wrapper.appendChild(svg);
}); });
}); });
@ -1581,6 +1581,7 @@ var PDFPageView = function PDFPageViewClosure() {
} }
}; };
}, },
setPageLabel: function PDFView_setPageLabel(label) { setPageLabel: function PDFView_setPageLabel(label) {
this.pageLabel = typeof label === 'string' ? label : null; this.pageLabel = typeof label === 'string' ? label : null;
if (this.pageLabel !== null) { if (this.pageLabel !== null) {

2
web/pdf_viewer.js.map

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