Response (GET)

Please refer to the following for setting the response from the server to a GET request from the client in CloudPRNT.

Response header

Response Body

HTTP status code, Custom headers defined in CloudPRNT (optional)

Content data for the print job encoded in the media type specified by the client (does not include JSON data).

The server response should include the print job data as the message body, encoded in the requested format, and with the requested format as the specified content type in the http header.
It is possible that the client will re-request the data, by sending further GET requests for the same document.
This is unlikely in usual operation but should be supported by the server.

The server should set an appropriate HTTP status code in the response header, with one of the following values.

  • 200 (OK) - If the operation succeeded and the job was returned as expected.

  • 404 (not found) - If no data is available for printing.

  • 415 (unsupported media type) - If the request was for a content type that the server can not support.

In case of an error status code, the response body will be ignored, and so may be empty.

Below is an example of how the printer operates after receiving each HTTP response status code related to the GET response from the server.

Status Code

Printer action

200

After printing is completed, issue Print job confirmation (DELETE) with 200 OK appended to the code parameter.

Other than 200

issue Print job confirmation (DELETE) with 520(or 521) error code appended to the code parameter.

Response header

When a print job uses the Media type which is text/plain, image/png, image/jpeg, then the server can set extra control options in the response header, with one of the following field and value.

Custom Response Header and Supported Models List:

Header Field Name

IFBD-HI01X/HI02X

mC-Print2/3

TSP100IV

TSP100IV SK

mC-Label3

X-Star-Buzzerstartpattern

1.1.0 or later

1.2 or later

1.0 or later

2.0 or later

1.0 or later

X-Star-Buzzerendpattern

1.1.0 or later

1.2 or later

1.0 or later

2.0 or later

1.0 or later

X-Star-Cut

1.4.0以上

1.2 or later

1.0 or later

2.0 or later

1.0 or later

X-Star-ImageDitherPattern

1.1.0 or later

1.2 or later

1.0 or later

2.0 or later

1.0 or later

X-Star-CashDrawer

1.1.0 or later

1.2 or later

1.0 or later

2.0 or later

1.0 or later

X-Star-UseDeviceCommand

1.8.0 or later

3.5 or later

1.0 or later

2.0 or later

1.0 or later

X-Star-PaperPresentStatusControl

1.9.0 or later(*1)

n/a

n/a

2.0 or later

1.0 or later

X-Star-HoldPrintControl

1.9.0 or later(*1)

n/a

n/a

2.0 or later

1.0 or later

(*1) Only available with TSP650IISK printer.

Custom Response Header List:

Header Field Name

Example

Description

X-Star-Buzzerstartpattern

X-Star-Buzzerstartpattern: 1

Performs buzzer before printing the sent job. The specified value is a number of performing buzzer.

Value Range: From ‘1’ to ‘3’
(The number of times specification does not work in MCS10, so please specify 1.)

X-Star-Buzzerendpattern

X-Star-Buzzerendpattern: 1

Performs buzzer after printing the sent job. The specified value is a number of performing buzzer.

Value Range: From ‘1’ to ‘3’
(The number of times specification does not work in MCS10, so please specify 1.)

X-Star-Cut

X-Star-Cut: full; feed=true

Specified the method of cut to perform at the end of a document.

Supported Values: full, partial, none.

X-Star-ImageDitherPattern

X-Star-ImageDitherPattern: none

Specify the dithering method to use when printing and image.
(defaults to ‘fs’ if not specified)

Values:
* none - disable dithering
* fs - use Floyd Steinberg error diffusion dither

X-Star-CashDrawer

X-Star-CashDrawer: start

Trigger opening a cash drawer at the start or end of a job.

Values:
* none - do not use the drawer
* start - open before printing
* end - open after printing

X-Star-UseDeviceCommand

X-Star-UseDeviceCommand: true

Set an enabling for vnd/application.xxx mediatypes of custom header except image dither pattern.

Values: true, false(default)

Note that it is possible to duplicate Cut/CashDrawer/Buzzer operation if the job data is included these command.
Therefore please take care if uses this feature as enabled.

X-Star-PaperPresentStatusControl

X-Star-PaperPresentStatusControl: default

Set a flag that the client will use to decide a command about an control of paper present status send to printer at prnting a job.
If specified this option, then PaperPresentStatusControl value of clientAction is ignore once.

Values:
* default - After sending next print job, follows a client’s memory switch setting.
* valid - After sending next print job, informs the paper present status in printer ASB status at 7th byte.
* invalid - After sending next print job, does not inform the paper present status.

X-Star-HoldPrintControl

X-Star-HoldPrintControl: invalid

Set a flag that the client will use to decide a command about an control of hold print send to printer at prnting a job.
If specified this option, then HoldPrintControl value of clientAction is ignore once.

Values:
* default - After sending next print job, follows a client’s memory switch setting.
* valid - After sending next print job, enable the FW control of hold print.
* invalid - After sending next print job, disable the FW control of hold print.

It recommends to set invalid when use this option.