mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-04 16:07:57 +03:00
Fixed an expression which led to a KeyError for internal links.
This commit is contained in:
parent
7ac01f0519
commit
12734323f4
@ -595,7 +595,7 @@ def write_pdf_metadata(document, fileobj, scale, metadata, url_fetcher=None):
|
||||
content = [pdf_format('<< /Type /Annot '
|
||||
'/Rect [{0:f} {1:f} {2:f} {3:f}] /Border [0 0 0]\n',
|
||||
*rectangle)]
|
||||
if is_internal != 'attachment' and not annot_files[target] is None:
|
||||
if is_internal != 'attachment' or annot_files[target] is None:
|
||||
content.append(b'/Subtype /Link ')
|
||||
if is_internal == 'internal':
|
||||
content.append(pdf_format(
|
||||
|
Loading…
Reference in New Issue
Block a user