PrintPdfPages print = new PrintPdfPages ( "C:/pdfs/mypdf.pdf" );   if ( print. openPDFFile ()) { print. printAllPages ( "Printer Name" ); }