pdf generation refactoring to use PublicationRecepient and HtmlMessageGenerator