Modifications to be able to generate PDF