Is there a way to turn an html/pdf file into a text file?

There is information I’d like to have aveliable for editing but it’s on htlm and pdf (so I can’t copy and paste)

I don’t want to type all the 434789364378 numbers in the document…is there a way I can have it as a txt file?

Foxit Reader