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:
commit
92d0d1d694
9 changed files with 1786 additions and 23 deletions
12
src/api.js
12
src/api.js
|
@ -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;
|
||||
},
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue