bugfix by Humberto Pereira

git-svn-id: https://pdfminerr.googlecode.com/svn/trunk/pdfminer@241 1aa58f4a-7d42-0410-adbc-911cccaed67c
pull/1/head
yusuke.shinyama.dummy 2010-08-29 06:59:50 +00:00
parent 0944cfaded
commit ca5588a702
1 changed files with 4 additions and 2 deletions

View File

@ -129,6 +129,8 @@ def dumpoutline(outfp, fname, objids, pagenos, password='',
subtype = action.get('S')
if subtype and repr(subtype) == '/GoTo' and action.get('D'):
dest = action['D']
if isinstance(dest, str):
dest = resolve1(doc.lookup_name('Dests', dest))
pageno = pages[dest[0].objid]
s = e(title).encode('utf-8', 'xmlcharrefreplace')
outfp.write('<outline level="%r" title="%s">\n' % (level, s))