add pdf generation functionality