Skip to content

Pdfrw method to change Annotation Name #252

Open

Description

@amonterosolnet

Hi!

Been looking around the documentation, but cant find anything relative to this, so i will ask:

There is a method or function to save a new Name for a listed Annotation?

Image
That Textbox has this Name: Given Name Text Box and i need a way to change that name to whatever i need, like Test1.

`pdf = pdfrw.PdfReader(file_path)
for page in pdf.pages:
annotations = page['/Annots']
if annotations is None:
continue

for annotation in annotations:
    if annotation['/Subtype']=='/Widget':
        if annotation['/T']:
            key = annotation['/T'].to_unicode()
            print (key)

`
With that code ive got all the Names, but i miss something to update that Names with pdfrw.
Is this possible or im asking something can be done with this library?

thanks to anyone spare some time to answer this!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions