From 8e461c0843655847fe69b341c0181375e147dc37 Mon Sep 17 00:00:00 2001 From: pmiller66 Date: Fri, 12 Jan 2024 11:13:29 -0500 Subject: [PATCH] Update _writer.py /TYPE for a link should be "/Annot" not "/Annots" This change makes add_uri work; previously, it did not. --- pypdf/_writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pypdf/_writer.py b/pypdf/_writer.py index e12c2e8ab..5938d8d86 100644 --- a/pypdf/_writer.py +++ b/pypdf/_writer.py @@ -1922,7 +1922,7 @@ def add_uri( lnk = DictionaryObject() lnk.update( { - NameObject(AA.Type): NameObject(PG.ANNOTS), + NameObject(AA.Type): NameObject("/Annot"), NameObject(AA.Subtype): NameObject("/Link"), NameObject(AA.P): page_link, NameObject(AA.Rect): rect,