mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Adds Streams API in getTextContent to stream data.
This patch adds Streams API support in getTextContent so that we can stream data in chunks instead of fetching whole data from worker thread to main thread. This patch supports Streams API without changing the core functionality of getTextContent. Enqueue textContent directly at getTextContent in partialEvaluator. Adds desiredSize and ready property in streamSink.
This commit is contained in:
parent
209751346c
commit
0c13d0ff46
8 changed files with 275 additions and 114 deletions
|
@ -271,7 +271,7 @@ var Page = (function PageClosure() {
|
|||
},
|
||||
|
||||
extractTextContent({ handler, task, normalizeWhitespace,
|
||||
combineTextItems, }) {
|
||||
sink, combineTextItems, }) {
|
||||
var contentStreamPromise = this.pdfManager.ensure(this,
|
||||
'getContentStream');
|
||||
var resourcesPromise = this.loadResources([
|
||||
|
@ -299,6 +299,7 @@ var Page = (function PageClosure() {
|
|||
resources: this.resources,
|
||||
normalizeWhitespace,
|
||||
combineTextItems,
|
||||
sink,
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue