git-svn-id: https://pdfminerr.googlecode.com/svn/trunk/pdfminer@134 1aa58f4a-7d42-0410-adbc-911cccaed67c
pull/1/head
yusuke.shinyama.dummy 2009-09-16 12:51:11 +00:00
parent 5b02461c6d
commit 3f93fbcefc
2 changed files with 2 additions and 2 deletions

View File

@ -756,7 +756,7 @@ def process_pdf(rsrc, device, fp, pagenos=None, maxpages=0, password=''):
parser = PDFParser(doc, fp)
doc.initialize(password)
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)
for (pageno,page) in enumerate(doc.get_pages()):
if pagenos and (pageno not in pagenos): continue

View File

@ -463,7 +463,7 @@ class PDFDocument(object):
if tree.get('Type') is LITERAL_PAGES and 'Kids' in tree:
if 1 <= self.debug:
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):
yield x
elif tree.get('Type') is LITERAL_PAGE: