mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
Use page promise for text extraction.
This commit is contained in:
parent
7bdee4069c
commit
a64cd42de9
1 changed files with 3 additions and 5 deletions
|
@ -33,7 +33,6 @@ var PageView = function pageView(container, id, scale,
|
|||
this.renderingState = RenderingStates.INITIAL;
|
||||
this.resume = null;
|
||||
|
||||
this.textContent = null;
|
||||
this.textLayer = null;
|
||||
|
||||
this.zoomLayer = null;
|
||||
|
@ -406,10 +405,9 @@ var PageView = function pageView(container, id, scale,
|
|||
};
|
||||
|
||||
this.getTextContent = function pageviewGetTextContent() {
|
||||
if (!this.textContent) {
|
||||
this.textContent = this.pdfPage.getTextContent();
|
||||
}
|
||||
return this.textContent;
|
||||
return PDFView.getPage(this.id).then(function(pdfPage) {
|
||||
return pdfPage.getTextContent();
|
||||
});
|
||||
};
|
||||
|
||||
this.draw = function pageviewDraw(callback) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue