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:
|
if not isinstance(stream, PDFStream) or stream['Type'] is not LITERAL_XREF:
|
||||||
raise PDFNoValidXRef('Invalid PDF stream spec.')
|
raise PDFNoValidXRef('Invalid PDF stream spec.')
|
||||||
size = stream['Size']
|
size = stream['Size']
|
||||||
index_array = stream.get('Index', (1, size))
|
index_array = stream.get('Index', (0, size))
|
||||||
if len(index_array) % 2 != 0:
|
if len(index_array) % 2 != 0:
|
||||||
raise PDFSyntaxError('Invalid index number')
|
raise PDFSyntaxError('Invalid index number')
|
||||||
self.ranges.extend(choplist(2, index_array))
|
self.ranges.extend(choplist(2, index_array))
|
||||||
|
|
|
@ -313,7 +313,7 @@ class PDFPageInterpreter(object):
|
||||||
return
|
return
|
||||||
|
|
||||||
def dup(self):
|
def dup(self):
|
||||||
return PDFPageInterpreter(self.rsrcmgr, self.device)
|
return self.__class__(self.rsrcmgr, self.device)
|
||||||
|
|
||||||
# init_resources(resources):
|
# init_resources(resources):
|
||||||
# Prepare the fonts and XObjects listed in the Resource attribute.
|
# Prepare the fonts and XObjects listed in the Resource attribute.
|
||||||
|
|
Loading…
Reference in New Issue