There are two ways to do it: One is to export the PDF as a text file and then compare the two in a text editor. The second is to import the text file as a DataObject into the PDF and then compare them in Acrobat using JS.