Introduced the function responsible for generating the PDF