Refactor the PDF generation behaviour into a separate bundle