Added more specs and raise error if source file is not a pdf