updated to the new printPDF definition