Fixed: PDFXRefStream.get_objids returns invalid objids.

pull/1/head
Yusuke Shinyama 2014-03-28 17:29:26 +09:00
parent 57adad55d7
commit 7849c8724a
1 changed files with 5 additions and 1 deletions

View File

@ -238,6 +238,10 @@ class PDFXRefStream(PDFBaseXRef):
def get_objids(self):
for (start, nobjs) in self.ranges:
for i in xrange(nobjs):
offset = self.entlen * i
ent = self.data[offset:offset+self.entlen]
f1 = nunpack(ent[:self.fl1], 1)
if f1 == 1 or f1 == 2:
yield start+i
return