|
|
@ -361,7 +361,8 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Text style |
|
|
|
* Text style. |
|
|
|
|
|
|
|
* |
|
|
|
* @typedef {Object} TextStyle |
|
|
|
* @typedef {Object} TextStyle |
|
|
|
* @property {number} ascent - font ascent. |
|
|
|
* @property {number} ascent - font ascent. |
|
|
|
* @property {number} descent - font descent. |
|
|
|
* @property {number} descent - font descent. |
|
|
@ -369,6 +370,23 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() { |
|
|
|
* @property {string} fontFamily - possible font family |
|
|
|
* @property {string} fontFamily - possible font family |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Page render parameters. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @typedef {Object} RenderParameters |
|
|
|
|
|
|
|
* @property {Object} canvasContext - A 2D context of a DOM Canvas object. |
|
|
|
|
|
|
|
* @property {PageViewport} viewport - Rendering viewport obtained by |
|
|
|
|
|
|
|
* calling of PDFPage.getViewport method. |
|
|
|
|
|
|
|
* @property {string} intent - Rendering intent, can be 'display' or 'print' |
|
|
|
|
|
|
|
* (default value is 'display'). |
|
|
|
|
|
|
|
* @property {Object} imageLayer - (optional) An object that has beginLayout, |
|
|
|
|
|
|
|
* endLayout and appendImage functions. |
|
|
|
|
|
|
|
* @property {function} continueCallback - (optional) A function that will be |
|
|
|
|
|
|
|
* called each time the rendering is paused. To continue |
|
|
|
|
|
|
|
* rendering call the function that is the first argument |
|
|
|
|
|
|
|
* to the callback. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Proxy to a PDFPage in the worker thread. |
|
|
|
* Proxy to a PDFPage in the worker thread. |
|
|
|
* @class |
|
|
|
* @class |
|
|
@ -441,18 +459,9 @@ var PDFPageProxy = (function PDFPageProxyClosure() { |
|
|
|
}, |
|
|
|
}, |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Begins the process of rendering a page to the desired context. |
|
|
|
* Begins the process of rendering a page to the desired context. |
|
|
|
* @param {Object} params A parameter object that supports: |
|
|
|
* @param {RenderParameters} params Page render parameters. |
|
|
|
* { |
|
|
|
* @return {RenderTask} An object that contains the promise, which |
|
|
|
* canvasContext(required): A 2D context of a DOM Canvas object., |
|
|
|
* is resolved when the page finishes rendering. |
|
|
|
* imageLayer(optional): An object that has beginLayout, endLayout and |
|
|
|
|
|
|
|
* appendImage functions., |
|
|
|
|
|
|
|
* continueCallback(optional): A function that will be called each time |
|
|
|
|
|
|
|
* the rendering is paused. To continue |
|
|
|
|
|
|
|
* rendering call the function that is the |
|
|
|
|
|
|
|
* first argument to the callback. |
|
|
|
|
|
|
|
* }. |
|
|
|
|
|
|
|
* @return {RenderTask} An extended promise that is resolved when the page |
|
|
|
|
|
|
|
* finishes rendering (see RenderTask). |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
render: function PDFPageProxy_render(params) { |
|
|
|
render: function PDFPageProxy_render(params) { |
|
|
|
var stats = this.stats; |
|
|
|
var stats = this.stats; |
|
|
|