added example code for creating a pdf