How to customise PDF output?