Sample code for pdf generation