compare hash extracted from PDF with expected hash