create method for pdf creation & download