From 5c7a6dd97125950d61ec02bca312b5aecd4c7ad0 Mon Sep 17 00:00:00 2001 From: yanntrividic Date: Fri, 30 Aug 2024 15:04:38 +0200 Subject: [PATCH] Dest key added to the debug annotations --- weasyprint/pdf/debug.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weasyprint/pdf/debug.py b/weasyprint/pdf/debug.py index a945f1eae..9059e0478 100644 --- a/weasyprint/pdf/debug.py +++ b/weasyprint/pdf/debug.py @@ -32,6 +32,10 @@ def debug(pdf, metadata, document, page_streams, attachments, compress): 'T': pydyf.String(id), # id added as metadata }) + # The next line makes all of this relevent to use + # with PDFjs + annotation['Dest'] = pydyf.String(id) + pdf.add_object(annotation) page['Annots'].append(annotation.reference)