fix print-pdf code