Merge pull request #3920 from brendandahl/text-promise
Use page promise for text extraction.
This commit is contained in:
commit
945e370d4f
@ -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…
Reference in New Issue
Block a user