1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Merge new API and text search.

This commit is contained in:
Brendan Dahl 2012-04-20 16:49:08 -07:00
commit 92d0d1d694
9 changed files with 1786 additions and 23 deletions

View file

@ -329,12 +329,18 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
next();
},
/**
* Stub for future feature.
* @return {Promise} That is resolved with the a {string} that is the text
* content from the page.
*/
getTextContent: function() {
var promise = new PDFJS.Promise();
var textContent = 'page text'; // not implemented
promise.resolve(textContent);
this.transport.messageHandler.send('GetTextContent', {
pageIndex: this.pageNumber - 1
},
function textContentCallback(textContent) {
promise.resolve(textContent);
}
);
return promise;
},
/**