loginToGoogle("rennbahn2000@gmail.com", "maxdata-01")) { $printers = $gcp->getPrinters(); $printerid = ""; if(count($printers)==0) { $content = "Could not get printers"; } else { $printerid = $printers[0]['id']; $resarray = $gcp->sendPrintToPrinter($printerid, "Printing Doc using Google Cloud Printing", "upload/" . $_FILES["upload"]["name"], "application/pdf"); if($resarray['status']==true) { $content = "Document has been sent to printer and should print shortly."; } else { $content = "An error occured while printing the doc. Error code:".$resarray['errorcode']." Message:".$resarray['errormessage']; } } } else { $content = "Login failed please check login info."; } } else { $content = "ERROR:
Invalid file upload only PDF file."; } } else { $content = '
'; } $template->assign('content', 'tpl/i_info.tpl'); ?>