Use HTML table cell value as wepage title

I have an HTML table cell that holds a dynamically created invoice number that consists of letters, dashes, and numbers.

I need to get the value of that cell and use it as the webpage’s title.

The page will be saved as a .pdf, with the invoice number as its file name.

The table ‘id’ is “invoice_details” and the cell ‘id’ is “invoice_number”.

Hope you can help.