Skip to content

Commit 99e00a2

Browse files
authored
Update _markup_annotations.py py-pdf#2447
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 NameObject:({self})" line 592 _base.py (pypdf.generic) resolves py-pdf#2444 Issue
1 parent 3fb63f7 commit 99e00a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pypdf/annotations/_markup_annotations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ def __init__(
325325

326326
border_arr: BorderArrayType
327327
if border is not None:
328-
border_arr = [NameObject(n) for n in border[:3]]
328+
border_arr = [NumberObject(n) for n in border[:3]]
329329
if len(border) == 4:
330-
dash_pattern = ArrayObject([NameObject(n) for n in border[3]])
330+
dash_pattern = ArrayObject([NumberObject(n) for n in border[3]])
331331
border_arr.append(dash_pattern)
332332
else:
333333
border_arr = [NumberObject(0)] * 3

0 commit comments

Comments
 (0)