Applied a patch by Axel Kaiser.
parent
d7c4ff28e9
commit
607be269ab
|
@ -219,7 +219,7 @@ class PDFXRefStream(PDFBaseXRef):
|
|||
if not isinstance(stream, PDFStream) or stream['Type'] is not LITERAL_XREF:
|
||||
raise PDFNoValidXRef('Invalid PDF stream spec.')
|
||||
size = stream['Size']
|
||||
index_array = stream.get('Index', (1, size))
|
||||
index_array = stream.get('Index', (0, size))
|
||||
if len(index_array) % 2 != 0:
|
||||
raise PDFSyntaxError('Invalid index number')
|
||||
self.ranges.extend(choplist(2, index_array))
|
||||
|
|
|
@ -313,7 +313,7 @@ class PDFPageInterpreter(object):
|
|||
return
|
||||
|
||||
def dup(self):
|
||||
return PDFPageInterpreter(self.rsrcmgr, self.device)
|
||||
return self.__class__(self.rsrcmgr, self.device)
|
||||
|
||||
# init_resources(resources):
|
||||
# Prepare the fonts and XObjects listed in the Resource attribute.
|
||||
|
|
Loading…
Reference in New Issue