in reply to Extract images and text from the pdf and compare the byte stream..
What have you tried so far? Perhaps CAM::PDF and its related scripts/modules would be a good place to start.
Martin