Print via GCP to ZPL printer

2,429 views
Skip to first unread message

Alison Flood

unread,
Feb 25, 2014, 3:30:45 AM2/25/14
to gcp-dev...@googlegroups.com
Hi,

I'm trying to print a .zpl (Zebra Programming Language) file to a Zebra Printer with no luck.  I can print a PDF to this printer with contentType set to 'application/pdf', and I can send a .zpl file with 'text/plain' (though this spits out as the raw ZPL code rather than the interpreted data, which is not useful).  If I try setting a custom content type such as 'application/zpl' or 'text/zpl' the print job goes through but errors in the queue.  I notice in the printer details in the GCP web interface that the Supported Content Types are listed as 'application/vnd.ms-xpsdocument, application/pdf'.  How can I go about changing this to accept the printer's native content type of zpl?  Alternatively, how do I /submit a print job without GCP performing sorcery on the content type and just send it through as ZPL?

Note I am only using the /submit interface currently, the printer was registered via the GCP web interface.

Please let me know if any more info is required from me, I am keen to solve this :)

Robert Toscano

unread,
Feb 25, 2014, 12:42:35 PM2/25/14
to gcp-dev...@googlegroups.com
You can prevent the sorcery by using your own content type like you did with "application/zpl" or "text/zpl". In this case the document will be untouched in the GCP conversion pipeline. Yet you see an error in the queue. How is your printer connected? If you're using the Chrome connector, this connector can only download "application/pdf" or "application/vnd.ms-xpsdocument". So because the printer is asking for a content type that is different than what was submitted, GCP must try and convert it. But since we don't recognize your content type, we fail to convert.

The solution would be to take control of the download request, and have the printer/printer-software request the document in "text/zpl". This way the content type that the document was submitted as, matches the content type that was requested to be downloaded.


--
You received this message because you are subscribed to the Google Groups "Google Cloud Print Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gcp-developer...@googlegroups.com.
Visit this group at http://groups.google.com/group/gcp-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/gcp-developers/921910df-ea74-4e95-a8a6-5340d7e5c7a5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Alison Flood

unread,
Feb 25, 2014, 5:25:37 PM2/25/14
to gcp-dev...@googlegroups.com
Hi Robert,

Thanks very much for your response!

I am indeed using the Chrome connector (i.e. I registered the printer using Chrome and am viewing the print queue via chrome, if this is what you mean).  

How would I "take control" of the download request?  Using the fetch interface?  Can this be utilised for a classic printer such as I am using?  

Thanks again for your help.

Robert Toscano

unread,
Feb 25, 2014, 6:35:47 PM2/25/14
to gcp-dev...@googlegroups.com
By "take control" I mean ditch the Chrome connector and write the software yourself. Chrome connector uses operating system APIs to submit the document to the classic printer, but it can only do a limited set of document types. If you want to use your own document type, you'll have to write a piece of software that essentially does what the Chrome connector does: use GCP APIs to register printers, listen for XMPP notifications, download print jobs, and mark jobs as DONE (or ERROR). The only difference is that your software will be able to handle text/zpl.


Richard

unread,
Feb 26, 2014, 11:53:47 AM2/26/14
to gcp-dev...@googlegroups.com
Alison,
Our GCP proxy product, Cloud Print for Windows, will handle the Zebra Printer. Visit www.swdevs.com for more information.

Brent Sanders

unread,
Dec 17, 2014, 7:20:47 PM12/17/14
to gcp-dev...@googlegroups.com
This was working for us up until just recently.  Has the conversion pipeline changed.  I now get errors that my ZPL file cannot be converted to a PDF.  How can I avoid the sorcery?

Brent Sanders

unread,
Dec 17, 2014, 7:52:56 PM12/17/14
to gcp-dev...@googlegroups.com
I just tried this out and it fixed my issue.  I'm now able to have my system send ZPL files without any issue.  Will be purchasing this!
Reply all
Reply to author
Forward
0 new messages