Added the pdf reading and handling