Browse Source

Merge remote branch 'upstream/master'

Vivien Nicolas 14 years ago
parent
commit
d02a84ea5f
  1. 9
      pdf.js
  2. 4
      test/driver.js

9
pdf.js

@ -208,6 +208,11 @@ var DecodeStream = (function() {
this.readBlock(); this.readBlock();
var end = this.bufferLength; var end = this.bufferLength;
// checking if bufferLength is still 0 then
// the buffer has to be initialized
if (!end)
this.buffer = new Uint8Array(0);
} }
this.pos = end; this.pos = end;
@ -3340,11 +3345,11 @@ var Page = (function() {
var xref = this.xref; var xref = this.xref;
var content = xref.fetchIfRef(this.content); var content = xref.fetchIfRef(this.content);
var resources = xref.fetchIfRef(this.resources); var resources = xref.fetchIfRef(this.resources);
if (IsArray(this.content)) { if (IsArray(content)) {
// fetching items // fetching items
var i, n = content.length; var i, n = content.length;
for (i = 0; i < n; ++i) for (i = 0; i < n; ++i)
content[i] = xref.fetchIfRef(this.content[i]); content[i] = xref.fetchIfRef(content[i]);
content = new StreamsSequenceStream(content); content = new StreamsSequenceStream(content);
} }
this.code = gfx.compile(content, xref, resources, fonts, images); this.code = gfx.compile(content, xref, resources, fonts, images);

4
test/driver.js

@ -221,6 +221,8 @@ function checkScrolling() {
} }
function log(str) { function log(str) {
stdout.innerHTML += str; stdout.insertAdjacentHTML('BeforeEnd', str);
if (str.lastIndexOf('\n') >= 0)
checkScrolling(); checkScrolling();
} }

Loading…
Cancel
Save