yasirsiddiqui / php-google-cloud-print

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

Error code:403 Message:Could not convert to PDF. #21

Open Amaraweera opened 8 years ago

Amaraweera commented 8 years ago

Error code:403 Message:Could not convert to PDF.

yasirsiddiqui commented 8 years ago

Are you trying to send pdf file to printer? Please elaborate.

minesh0111 commented 8 years ago

I am also facing same issue when trying to print html content

yasirsiddiqui commented 8 years ago

what is the last argument you are passing to this function $gcp->sendPrintToPrinter?

minesh0111 commented 8 years ago
<script>
          window.onload = function() {
            var gadget = new cloudprint.Gadget();
            gadget.setPrintButton(
                cloudprint.Gadget.createDefaultPrintButton("print_button_container")); // div id to contain the button
            gadget.setPrintDocument("[document mimetype]", "[document title]", "[document content]");
          }
</script>

This is my code

tomgrant commented 7 years ago

I'm having the same issue, the last argument being passed into $gcp->sendPrintToPrinter is "application/html"

I also tried "text/html", but that only printed 0