Example implementation of printPDF.java