Improved generation of the PDF report.