mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Fixes content stream reset; terminating rendering when destroyed
This commit is contained in:
parent
32684fe324
commit
b6edbb38c1
2 changed files with 12 additions and 4 deletions
|
@ -137,10 +137,13 @@ var Page = (function PageClosure() {
|
|||
var resources = this.resources;
|
||||
if (isArray(content)) {
|
||||
// fetching items
|
||||
var streams = [];
|
||||
var i, n = content.length;
|
||||
for (i = 0; i < n; ++i)
|
||||
content[i] = xref.fetchIfRef(content[i]);
|
||||
content = new StreamsSequenceStream(content);
|
||||
streams.push(xref.fetchIfRef(content[i]));
|
||||
content = new StreamsSequenceStream(streams);
|
||||
} else if (isStream(content)) {
|
||||
content.reset();
|
||||
} else if (!content) {
|
||||
// replacing non-existent page content with empty one
|
||||
content = new Stream(new Uint8Array(0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue