A PDF doc generation wrapper