There are commercial tools that can do this - one of them is pdfToolbox from callas software (warning - I'm associated with this company).
However, despite the fact that this function exists and is sometimes used, the results are often completely undesirable, and I have not seen many contexts where it is used for more than certain files. And usually with limited success. By the time this replacement is available only in manual mode in the said tool, and not in automatic mode.
Depending on how complex these files are, you will probably have better success in extracting all the text from the documents into something like RTF, perform any manipulations you need to do, and subsequently restore the PDF. It sounds like a roundabout way, but I assume that in most cases the result will be better ...
source share