Rename a PDF taking its name from the content

Hi, I'm in this situation: I have a number of PDF documents. Each of them contains a table and some text. In each document there is a box that contains a person's "name and surname". I would like to rename each file with the name and surname, taking them from the contents of the pdf. It can be done? Thanks for your help!