Skip to content

Commit

Permalink
Update _markup_annotations.py py-pdf#2447
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rsinger417 authored Feb 8, 2024
1 parent 3fb63f7 commit 99e00a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pypdf/annotations/_markup_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99e00a2

Please sign in to comment.