bugfixes
git-svn-id: https://pdfminerr.googlecode.com/svn/trunk/pdfminer@134 1aa58f4a-7d42-0410-adbc-911cccaed67cpull/1/head
parent
5b02461c6d
commit
3f93fbcefc
|
@ -756,7 +756,7 @@ def process_pdf(rsrc, device, fp, pagenos=None, maxpages=0, password=''):
|
||||||
parser = PDFParser(doc, fp)
|
parser = PDFParser(doc, fp)
|
||||||
doc.initialize(password)
|
doc.initialize(password)
|
||||||
if not doc.is_extractable:
|
if not doc.is_extractable:
|
||||||
raise PDFTextExtractionNotAllowed('Text extraction is not allowed: %r' % fp.name)
|
raise PDFTextExtractionNotAllowed('Text extraction is not allowed: %r' % fp)
|
||||||
interpreter = PDFPageInterpreter(rsrc, device)
|
interpreter = PDFPageInterpreter(rsrc, device)
|
||||||
for (pageno,page) in enumerate(doc.get_pages()):
|
for (pageno,page) in enumerate(doc.get_pages()):
|
||||||
if pagenos and (pageno not in pagenos): continue
|
if pagenos and (pageno not in pagenos): continue
|
||||||
|
|
|
@ -463,7 +463,7 @@ class PDFDocument(object):
|
||||||
if tree.get('Type') is LITERAL_PAGES and 'Kids' in tree:
|
if tree.get('Type') is LITERAL_PAGES and 'Kids' in tree:
|
||||||
if 1 <= self.debug:
|
if 1 <= self.debug:
|
||||||
print >>stderr, 'Pages: Kids=%r' % tree['Kids']
|
print >>stderr, 'Pages: Kids=%r' % tree['Kids']
|
||||||
for c in tree['Kids']:
|
for c in list_value(tree['Kids']):
|
||||||
for x in search(c, tree):
|
for x in search(c, tree):
|
||||||
yield x
|
yield x
|
||||||
elif tree.get('Type') is LITERAL_PAGE:
|
elif tree.get('Type') is LITERAL_PAGE:
|
||||||
|
|
Loading…
Reference in New Issue