Thank you for your interest in GroupDocs. To compare two documents they should be of the same type, for example pdf with pdf or doc with doc. Also to compare the documents they should have a text which will be compared. Since that you can’t compare image with text, even if the image pasted to the pdf (or to the another document type). Image can’t be compared at all (even with another image).
So to compare your scanned text with the written text you should “recognize” scanned image as text and save to the doc file. For example you can do that with these application