adding the pdf generation