Pdf generation

Pull request to kick off code review and discussion on integration.