How to customize PDF template output