yasirsiddiqui / php-google-cloud-print

PHP class to print documents using Google Cloud Print with OAuth2 authorization
91 stars 42 forks source link

Error 500 #22

Closed dpyudha closed 8 years ago

dpyudha commented 8 years ago

Hello sir, i got error 500, I've set the permissions 0777 on my file,

yasirsiddiqui commented 8 years ago

Can you provide some details about this error?

dpyudha commented 8 years ago

now, error 500 has disappeared, but i got this error sir,

Notice: Undefined property: stdClass::$ownerName in /var/www/html/printer/GoogleCloudPrint.php on line 251

Warning: fopen(./pdf.pdf): failed to open stream: No such file or directory in /var/www/html/printer/GoogleCloudPrint.php on line 174

Fatal error: Uncaught exception 'Exception' with message 'Could not read the file. Please check file path.' in /var/www/html/printer/GoogleCloudPrint.php:178 Stack trace: #0 /var/www/html/printer/example.php(42): GoogleCloudPrint->sendPrintToPrinter('07ee6b3d-50f7-1...', 'Printing Doc us...', './pdf.pdf', 'application/pdf') #1 {main} thrown in /var/www/html/printer/GoogleCloudPrint.php on line 178

yasirsiddiqui commented 8 years ago

You are not providing correct path to the file you want to print. This is the example i have provided in the code fopen(./pdf.pdf). You need to replace ./pdf.pdf with the file path you want to print.

dpyudha commented 8 years ago

wow thankyou sir, the problem was solved. thankyou very much

KamranBhatti commented 6 years ago

What if I want to print some text instead of any file?