Added class and methods to generate pdf file.