You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cryptpad/www/common/pdfjs/api/draft/PDFDocumentLoadingTask.html

1647 lines
18 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: PDFDocumentLoadingTask</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: PDFDocumentLoadingTask</h1>
<section>
<header>
<h2>PDFDocumentLoadingTask</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="PDFDocumentLoadingTask"><span class="type-signature"></span>new PDFDocumentLoadingTask<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
PDF document loading operation.
</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#line338">line 338</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="destroyed"><span class="type-signature"></span>destroyed<span class="type-signature"> :boolean</span></h4>
<div class="description">
Shows if loading task is destroyed.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">boolean</span>
</li>
</ul>
<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#line357">line 357</a>
</li></ul></dd>
</dl>
<h4 class="name" id="docId"><span class="type-signature"></span>docId<span class="type-signature"> :string</span></h4>
<div class="description">
Unique document loading task id -- used in MessageHandlers.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<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#line351">line 351</a>
</li></ul></dd>
</dl>
<h4 class="name" id="onPassword"><span class="type-signature"></span>onPassword<span class="type-signature"></span></h4>
<div class="description">
Callback to request a password if wrong or no password was provided.
The callback receives two parameters: function that needs to be called
with new password and reason (see {PasswordResponses}).
</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#line364">line 364</a>
</li></ul></dd>
</dl>
<h4 class="name" id="onProgress"><span class="type-signature"></span>onProgress<span class="type-signature"></span></h4>
<div class="description">
Callback to be able to monitor the loading progress of the PDF file
(necessary to implement e.g. a loading bar). The callback receives
an {Object} with the properties: {number} loaded and {number} total.
</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#line371">line 371</a>
</li></ul></dd>
</dl>
<h4 class="name" id="onUnsupportedFeature"><span class="type-signature"></span>onUnsupportedFeature<span class="type-signature"></span></h4>
<div class="description">
Callback to when unsupported feature is used. The callback receives
an {UNSUPPORTED_FEATURES} argument.
</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#line377">line 377</a>
</li></ul></dd>
</dl>
<h4 class="name" id="promise"><span class="type-signature"></span>promise<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#line385">line 385</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span><span class="type-signature"> &rarr; {Promise}</span></h4>
<div class="description">
Aborts all network requests and destroys 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#line394">line 394</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
A promise that is resolved after destruction activity
is completed.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise</span>
</dd>
</dl>
<h4 class="name" id="then"><span class="type-signature"></span>then<span class="signature">(onFulfilled, onRejected)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
<div class="description">
Registers callbacks to indicate the document loading completion.
</div>
<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>onFulfilled</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">The callback for the loading completion.</td>
</tr>
<tr>
<td class="name"><code>onRejected</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">The callback for the loading failure.</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#line416">line 416</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
A promise that is resolved after the onFulfilled or
onRejected callback.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise</span>
</dd>
</dl>
</article>
</section>
<section>
<header>
<h2>PDFDocumentLoadingTask</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="PDFDocumentLoadingTask"><span class="type-signature"></span>new PDFDocumentLoadingTask<span class="signature">()</span><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#line342">line 342</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="destroyed"><span class="type-signature"></span>destroyed<span class="type-signature"> :boolean</span></h4>
<div class="description">
Shows if loading task is destroyed.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">boolean</span>
</li>
</ul>
<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#line357">line 357</a>
</li></ul></dd>
</dl>
<h4 class="name" id="docId"><span class="type-signature"></span>docId<span class="type-signature"> :string</span></h4>
<div class="description">
Unique document loading task id -- used in MessageHandlers.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<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#line351">line 351</a>
</li></ul></dd>
</dl>
<h4 class="name" id="onPassword"><span class="type-signature"></span>onPassword<span class="type-signature"></span></h4>
<div class="description">
Callback to request a password if wrong or no password was provided.
The callback receives two parameters: function that needs to be called
with new password and reason (see {PasswordResponses}).
</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#line364">line 364</a>
</li></ul></dd>
</dl>
<h4 class="name" id="onProgress"><span class="type-signature"></span>onProgress<span class="type-signature"></span></h4>
<div class="description">
Callback to be able to monitor the loading progress of the PDF file
(necessary to implement e.g. a loading bar). The callback receives
an {Object} with the properties: {number} loaded and {number} total.
</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#line371">line 371</a>
</li></ul></dd>
</dl>
<h4 class="name" id="onUnsupportedFeature"><span class="type-signature"></span>onUnsupportedFeature<span class="type-signature"></span></h4>
<div class="description">
Callback to when unsupported feature is used. The callback receives
an {UNSUPPORTED_FEATURES} argument.
</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#line377">line 377</a>
</li></ul></dd>
</dl>
<h4 class="name" id="promise"><span class="type-signature"></span>promise<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#line385">line 385</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span><span class="type-signature"> &rarr; {Promise}</span></h4>
<div class="description">
Aborts all network requests and destroys 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#line394">line 394</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
A promise that is resolved after destruction activity
is completed.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise</span>
</dd>
</dl>
<h4 class="name" id="then"><span class="type-signature"></span>then<span class="signature">(onFulfilled, onRejected)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
<div class="description">
Registers callbacks to indicate the document loading completion.
</div>
<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>onFulfilled</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">The callback for the loading completion.</td>
</tr>
<tr>
<td class="name"><code>onRejected</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">The callback for the loading failure.</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#line416">line 416</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
A promise that is resolved after the onFulfilled or
onRejected callback.
</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>