1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Hack to support automatic printing from pdf javascript.

This commit is contained in:
Brendan Dahl 2013-02-28 15:29:07 -08:00
parent e20a9846ca
commit 5c43565404
4 changed files with 120 additions and 23 deletions

View file

@ -119,6 +119,16 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
promise.resolve(destinations);
return promise;
},
/**
* @return {Promise} A promise that is resolved with an array of all the
* JavaScript strings in the name tree.
*/
getJavaScript: function PDFDocumentProxy_getDestinations() {
var promise = new PDFJS.Promise();
var js = this.pdfInfo.javaScript;
promise.resolve(js);
return promise;
},
/**
* @return {Promise} 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: