<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: PDFDocumentProxy</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: PDFDocumentProxy</h1> <section> <header> <h2>PDFDocumentProxy</h2> </header> <article> <div class="container-overview"> <h4 class="name" id="PDFDocumentProxy"><span class="type-signature"></span>new PDFDocumentProxy<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Proxy to a PDFDocument in the worker thread. Also, contains commonly used properties that can be read synchronously. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line505">line 505</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="fingerprint"><span class="type-signature"></span>fingerprint<span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line522">line 522</a> </li></ul></dd> </dl> <h4 class="name" id="numPages"><span class="type-signature"></span>numPages<span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line515">line 515</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="cleanup"><span class="type-signature"></span>cleanup<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Cleans up resources allocated by the document, e.g. created @font-face. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line634">line 634</a> </li></ul></dd> </dl> <h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Destroys current document instance and terminates worker. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line640">line 640</a> </li></ul></dd> </dl> <h4 class="name" id="getAttachments"><span class="type-signature"></span>getAttachments<span class="signature">()</span><span class="type-signature"> → {Promise}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line571">line 571</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise that is resolved with a lookup table for mapping named attachments to their content. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="getData"><span class="type-signature"></span>getData<span class="signature">()</span><span class="type-signature"> → {Promise}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line613">line 613</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise that is resolved with a TypedArray that has the raw data from the PDF. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="getDestination"><span class="type-signature"></span>getDestination<span class="signature">(id)</span><span class="type-signature"> → {Promise}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The named destination to get.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line556">line 556</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise that is resolved with all information of the given named destination. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="getDestinations"><span class="type-signature"></span>getDestinations<span class="signature">()</span><span class="type-signature"> → {Promise}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line548">line 548</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise that is resolved with a lookup table for mapping named destinations to reference numbers. This can be slow for large documents: use getDestination instead </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="getDownloadInfo"><span class="type-signature"></span>getDownloadInfo<span class="signature">()</span><span class="type-signature"> → {Promise}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line621">line 621</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise that is resolved when the document's data is loaded. It is resolved with an {Object} that contains the length property that indicates size of the PDF data in bytes. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="getJavaScript"><span class="type-signature"></span>getJavaScript<span class="signature">()</span><span class="type-signature"> → {Promise}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line578">line 578</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise that is resolved with an array of all the JavaScript strings in the name tree. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="getMetadata"><span class="type-signature"></span>getMetadata<span class="signature">()</span><span class="type-signature"> → {Promise}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line606">line 606</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise that is resolved with an {Object} that has info and metadata properties. Info is an {Object} filled with anything available in the information dictionary and similarly metadata is a {Metadata} object with information from the metadata section of the PDF. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="getOutline"><span class="type-signature"></span>getOutline<span class="signature">()</span><span class="type-signature"> → {Promise}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line597">line 597</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise that is resolved with an {Array} that is a tree outline (if it has one) of the PDF. The tree is in the format of: [ { title: string, bold: boolean, italic: boolean, color: rgb Uint8Array, dest: dest obj, url: string, items: array of more items like this }, ... ]. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="getPage"><span class="type-signature"></span>getPage<span class="signature">(pageNumber)</span><span class="type-signature"> → {Promise}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>pageNumber</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">The page number to get. The first page is 1.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line530">line 530</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise that is resolved with a <a href="PDFPageProxy.html">PDFPageProxy</a> object. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="getPageIndex"><span class="type-signature"></span>getPageIndex<span class="signature">(ref)</span><span class="type-signature"> → {Promise}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>ref</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last">The page reference. Must have the 'num' and 'gen' properties.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line539">line 539</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise that is resolved with the page index that is associated with the reference. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="getPageLabels"><span class="type-signature"></span>getPageLabels<span class="signature">()</span><span class="type-signature"> → {Promise}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line564">line 564</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise that is resolved with: an Array containing the pageLabels that correspond to the pageIndexes, or `null` when no pageLabels are present in the PDF file. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="getStats"><span class="type-signature"></span>getStats<span class="signature">()</span><span class="type-signature"> → {Promise}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="display_api.js.html">display/api.js</a>, <a href="display_api.js.html#line628">line 628</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A promise this is resolved with current stats about document structures (see <a href="global.html#PDFDocumentStats">PDFDocumentStats</a>). </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Externals</h3><ul><li><a href="external-Promise.html">Promise</a></li></ul><h3>Classes</h3><ul><li><a href="AnnotationBorderStyle.html">AnnotationBorderStyle</a></li><li><a href="AnnotationFactory.html">AnnotationFactory</a></li><li><a href="PageViewport.html">PageViewport</a></li><li><a href="PDFDataRangeTransport.html">PDFDataRangeTransport</a></li><li><a href="PDFDocumentLoadingTask.html">PDFDocumentLoadingTask</a></li><li><a href="PDFDocumentProxy.html">PDFDocumentProxy</a></li><li><a href="PDFJS.html">PDFJS</a></li><li><a href="PDFPageProxy.html">PDFPageProxy</a></li><li><a href="PDFWorker.html">PDFWorker</a></li><li><a href="RenderTask.html">RenderTask</a></li></ul><h3>Global</h3><ul><li><a href="global.html#_UnsupportedManager">_UnsupportedManager</a></li><li><a href="global.html#arrayByteLength">arrayByteLength</a></li><li><a href="global.html#arraysToBytes">arraysToBytes</a></li><li><a href="global.html#createPromiseCapability">createPromiseCapability</a></li><li><a href="global.html#createValidAbsoluteUrl">createValidAbsoluteUrl</a></li><li><a href="global.html#getDocument">getDocument</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Jun 12 2017 08:43:32 GMT+0000 (Coordinated Universal Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>