throw an exception if the original file is not a pdf