generating pdf from ticket template