From 538b1c9df0e6092b1a83c03fa179746a60fcd9e5 Mon Sep 17 00:00:00 2001 From: rsinger417 <159086296+rsinger417@users.noreply.github.com> Date: Thu, 8 Feb 2024 09:12:08 -0600 Subject: [PATCH] Update _markup_annotations.py Change NameObject to NumberObject in lines 328 and 330 It will pass the array as a string and not an int if it is a NameObject and will cause a warning in the Class NameObject method renumber "Incorrect first char in cute NameObject:({self})" line 592 _base.py (pypdf.generic) --- pypdf/annotations/_markup_annotations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pypdf/annotations/_markup_annotations.py b/pypdf/annotations/_markup_annotations.py index c5e0a2fedc..4022fba2a0 100644 --- a/pypdf/annotations/_markup_annotations.py +++ b/pypdf/annotations/_markup_annotations.py @@ -325,9 +325,9 @@ def __init__( border_arr: BorderArrayType if border is not None: - border_arr = [NameObject(n) for n in border[:3]] + border_arr = [NumberObject(n) for n in border[:3]] if len(border) == 4: - dash_pattern = ArrayObject([NameObject(n) for n in border[3]]) + dash_pattern = ArrayObject([NumberObject(n) for n in border[3]]) border_arr.append(dash_pattern) else: border_arr = [NumberObject(0)] * 3