mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
PDF Output: Do not error out when the input document contains links with anchors not present in the document. Fixes #1096428 (pdf conversion fails in 0.9.13 64 bit calibre)
This commit is contained in:
parent
b88d2f8dc2
commit
7720a696d8
@ -58,7 +58,13 @@ class Links(object):
|
||||
0])})
|
||||
if is_local:
|
||||
path = combined_path if href else path
|
||||
annot['Dest'] = self.anchors[path][frag]
|
||||
try:
|
||||
annot['Dest'] = self.anchors[path][frag]
|
||||
except KeyError:
|
||||
try:
|
||||
annot['Dest'] = self.anchors[path][None]
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
url = href + (('#'+frag) if frag else '')
|
||||
purl = urlparse(url)
|
||||
|
Loading…
x
Reference in New Issue
Block a user