Merge github.com:euske/pdfminer

pull/1/head
Yusuke Shinyama 2011-10-30 15:44:49 +10:00
commit 3d1652963a
1 changed files with 4 additions and 1 deletions

View File

@ -454,7 +454,10 @@ class PDFDocument(object):
try: try:
obj = objs[i] obj = objs[i]
except IndexError: except IndexError:
raise PDFSyntaxError('Invalid object number: objid=%r' % (objid)) if STRICT:
raise PDFSyntaxError('Invalid object number: objid=%r' % (objid))
# return None for an invalid object number
return None
if isinstance(obj, PDFStream): if isinstance(obj, PDFStream):
obj.set_objid(objid, 0) obj.set_objid(objid, 0)
else: else: