0

I'm trying to send a request to the API without success.

When i use /search method i get the printer that i want and there is an array of allowed content-types and only application pdf appears there.

The problem is i need to print a text/html buffer or even a simple string.

Iv'e seen that the possibility to update the content types of printers has been deprecated.

How can i print those if they are not supported by the printer?

Can i somehow transform it to that content type?

Ariel
  • 821
  • 2
  • 9
  • 19
  • It seems that application/pdf is the only allowed content-type for the printer you select, so you shouldn't be able to send any job that doesn't match it. If you have the need to print other content-types, you must convert them as part of the job preparation in your app. – jmrodrigg Sep 01 '17 at 10:25

1 Answers1

0

Based on Google Cloud Print documentation:

Upon submission, GCP attempts to convert the document to a type supported by the printer. GCP officially supports conversion from the types "url", "application/pdf", "image/jpeg", and "image/png".

Regarding other content types:

For Microsoft Office formats (doc/docx, xls/xlsx, ppt/pptx) and various other content types such as "text/html", "text/plain", and "application/postscript", reliable conversion can be expected but is not guaranteed.

It's not clear how this conversion is performed, but I guess it is the same converter Google Docs uses.

If the printer directly supports printing a document submitted to GCP, conversion may not be necessary. Since the printer may support obscure content types not recognized by GCP, the /submit interface accepts documents of any type. It is at the point when the printer attempts to download the document that the print job will be aborted if the document cannot be printed.

This is probably where your print job fails, but we would need more details to clearly understand where's the issue:

  • Did you just used the /search interface?
  • Did you try submitting a job? Can you post your request and response?
  • Is it a Cloud Ready or non-cloud Printer?

Source: Google Cloud Print - Service Interfaces for Application Developers