Added the button and the function to generate pdf