Remove cache of page text content in core.
This commit is contained in:
parent
92d0d1d694
commit
8eaf0cdb18
11
src/core.js
11
src/core.js
@ -156,11 +156,6 @@ var Page = (function PageClosure() {
|
|||||||
return pe.getOperatorList(content, resources, dependency);
|
return pe.getOperatorList(content, resources, dependency);
|
||||||
},
|
},
|
||||||
extractTextContent: function Page_extractTextContent() {
|
extractTextContent: function Page_extractTextContent() {
|
||||||
if ('textContent' in this) {
|
|
||||||
// text content was extracted
|
|
||||||
return this.textContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
var handler = {
|
var handler = {
|
||||||
on: function nullHandlerOn() {},
|
on: function nullHandlerOn() {},
|
||||||
send: function nullHandlerSend() {}
|
send: function nullHandlerSend() {}
|
||||||
@ -176,13 +171,13 @@ var Page = (function PageClosure() {
|
|||||||
for (i = 0; i < n; ++i)
|
for (i = 0; i < n; ++i)
|
||||||
streams.push(xref.fetchIfRef(content[i]));
|
streams.push(xref.fetchIfRef(content[i]));
|
||||||
content = new StreamsSequenceStream(streams);
|
content = new StreamsSequenceStream(streams);
|
||||||
} else if (isStream(content))
|
} else if (isStream(content)) {
|
||||||
content.reset();
|
content.reset();
|
||||||
|
}
|
||||||
|
|
||||||
var pe = new PartialEvaluator(
|
var pe = new PartialEvaluator(
|
||||||
xref, handler, 'p' + this.pageNumber + '_');
|
xref, handler, 'p' + this.pageNumber + '_');
|
||||||
var text = pe.getTextContent(content, resources);
|
return pe.getTextContent(content, resources);
|
||||||
return (this.textContent = text);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
ensureFonts: function Page_ensureFonts(fonts, callback) {
|
ensureFonts: function Page_ensureFonts(fonts, callback) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user