PDFDocument.lookup_names.lookup didn't find 'Names' in some files

pull/1/head
Humberto Pereira 2012-03-19 16:42:58 -03:00
parent c7709045e9
commit 89c81db295
1 changed files with 4 additions and 4 deletions

View File

@ -553,10 +553,10 @@ class PDFDocument(object):
if 'Limits' in d: if 'Limits' in d:
(k1,k2) = list_value(d['Limits']) (k1,k2) = list_value(d['Limits'])
if key < k1 or k2 < key: return None if key < k1 or k2 < key: return None
if 'Names' in d: if 'Names' in d:
objs = list_value(d['Names']) objs = list_value(d['Names'])
names = dict(choplist(2, objs)) names = dict(choplist(2, objs))
return names[key] return names[key]
if 'Kids' in d: if 'Kids' in d:
for c in list_value(d['Kids']): for c in list_value(d['Kids']):
v = lookup(dict_value(c)) v = lookup(dict_value(c))