Adding PDF Generator code to Samples