I have been trying to print USPS label in ZPLII format using Google Cloud and CakePHP. I have registered my ZP500(ZPL) Thermal printer with the cloud. I am getting base64 encoded ZPLII data from USPS which I am storing in a .txt file after base64 decoding. I am sending Content-Type in cloud as text/plain(as I do t know what type exactly to send). When I send a request to cloud print, I see a request in the printer queue and it says printing. Then after few seconds it disappers from queue without printing anything. In Google cloud it says the page printed successfully. Below is the post fields that i am sending to google print:
$post_fields = array(
'printerid' => $printerid,
'title' => $printjobtitle,
'content' => ($contents),
'contentType' => $contenttype,
'ticket' => '{"version":"1.0","print":{"dpi":{"horizontal_dpi":600,"vertical_dpi":600}, "margins": {"top_microns":1, "right_microns":1, "bottom_microns": 1, "left_microns": 1}, "vendor_ticket_item":[]}}'
);
Can anyone tell what is that I am doing wrong here ?