What if the files are still different?
Your tool can be as crude as running the document through pdftotext and only keeping the text output. It can just throw away all these possible side channels that are not relevant to the actual content.
Others mentioned other more sophisticated side channels, as rewording sentences, but I'm sure authors would not welcome that.