Fixes compressed object entries caching

This commit is contained in:
Yury Delendik 2012-11-03 23:03:52 -05:00
parent f76adca471
commit 725195b65f
3 changed files with 15 additions and 2 deletions

View File

@ -701,7 +701,8 @@ var XRef = (function XRefClosure() {
}
// compressed entry
stream = this.fetch(new Ref(e.offset, 0));
var tableOffset = e.offset;
stream = this.fetch(new Ref(tableOffset, 0));
if (!isStream(stream))
error('bad ObjStm stream');
var first = stream.parameters.get('First');
@ -727,7 +728,11 @@ var XRef = (function XRefClosure() {
// read stream objects for cache
for (i = 0; i < n; ++i) {
entries.push(parser.getObj());
this.cache[nums[i]] = entries[i];
num = nums[i];
var entry = this.entries[num];
if (entry && entry.offset === tableOffset && entry.gen === i) {
this.cache[num] = entries[i];
}
}
e = entries[e.gen];
if (!e) {

View File

@ -0,0 +1 @@
http://www.iau.org/static/scientific_meetings/postmr12.pdf

View File

@ -727,6 +727,13 @@
"rounds": 1,
"type": "load"
},
{ "id": "issue1878",
"file": "pdfs/issue1878.pdf",
"md5": "b4fb0ce7c19368e7104dce3d0d34bcb3",
"rounds": 1,
"link": true,
"type": "load"
},
{ "id": "issue2337",
"file": "pdfs/issue2337.pdf",
"md5": "ea10f4131202b9b8f2a6cb7770d3f185",