Skip to content

Conversation

@rsinger417
Copy link
Contributor

@rsinger417 rsinger417 commented Feb 8, 2024

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 #2444 Issue

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)
@stefan6419846
Copy link
Collaborator

Could you please add a corresponding test case as well which shows the previous issue and demonstrates that your fix does indeed solve this?

@rsinger417 rsinger417 closed this by deleting the head repository Feb 8, 2024
rsinger417 added a commit to rsinger417/pypdf that referenced this pull request Feb 8, 2024
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
@rsinger417
Copy link
Contributor Author

link test code.txt
This code has the "border=[0,0,1,[3,2]]" as a Link argument. see files uploaded with PR #2450
This will create 5 warnings with each iteration "Incorrect first char in NameObject:(0)" 2 times and "Incorrect first char in NameObject:(1)", "Incorrect first char in NameObject:(3)" and "Incorrect first char in NameObject:(2)".
5 x 32 iterations will get you a 160 warnings.
It does not seem to effect the new pdf. a dashed border is drawn. I removed the border argument because I did not want the border. I didn't know the default was no border as can be shown in the _markup_annotations.py code line 333.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in Class Link when using border in arguments. example border = [0,0,1, [3,2]]

2 participants