3. Data Specifications
To realize the functionality of PassPRNT, application interaction using a URL scheme follows the iOS standard URL scheme (including path and query).
Using this method allows data to be accepted from the host application. Refer to the following for individual specifications.
Warning
For data passed from the host application side (especially the printing layout data of a html or pdf query etc.) through linkage between the application, set the lowest possible OS memory limitation.
Especially if examining the application of shared specifications with Android OS, be aware that the Android OS is set to a maximum of 1 MBs (this value will decrease depending on the memory usage state of the device and other applications).
When data that exceeds the usable memory size is sent from the host application, the OS may not operate successfully (does not switch to PassPRNT).
3.1. URL scheme
This application’s URL scheme is
starpassprnt
When the host application call this URL scheme, the OS automatically switches to this application. As the operations that occur after switching refer to the path settings shown in the next section, both need to be set correctly. Refer to the content of the SDK for the method for calling from the host application.
The following is for when calling from Javascript.
var passprnt_uri;
function createURI() {
passprnt_uri = "starpassprnt://v1/print/nopreview?";
passprnt_uri = passprnt_uri + "back=" + encodeURIComponent(window.location.href);
passprnt_uri = passprnt_uri + "&html=" + encodeURIComponent("<html><head>...</body></html>");
var target = document.getElementById("print");
target.href = passprnt_uri;
}
<html>
<head></head>
<body>
<a href="#" id="print">PRINT</a>
</body>
</html>
The following is for when calling from Objective-C.
[[UIApplication sharedApplication] openURL:@"starpassprnt://"];
While the URL scheme settings do not recognize differences between upper case and lower case letters, setting using lower case letters is recommended.
3.2. Path
The path after the URL scheme is defined based on the following rule
URL Version/Main Process/Sub-process
URL Version |
Version of the URL path (for switching internal processes) |
Main Process |
Declares the main process (function) in PassPRNT |
Sub-process |
Declares the sub-process (function) derived from the main process described above. |
The “URL Version” is defined using described above, with flexibility ensured by retaining the functionality of the old version and specifying the functional enhancement of the new version. The “Main Process” is not just for setting functions of ‘Print’, but for subdivisions of the primary function such as ‘Settings’ and ‘Register’ as well. This makes functional additions easier to implement, and increases possibilities for when the host application calls the applications. As with the “Main Process”, the functions of the “Sub-process” are subdivided as well.
The applicable path setting in this case is
v1/print/nopreview
This means: “Operate the application using URL version 1 for the printing function, with the preview disabled”. The result of this path being processed is the display of the “Now printing” screen described in “PassPRNT Screens” above. If a path other than this one is defined, an error will result.
While the path settings do not recognize differences between upper case and lower case letters, setting using lower case letters is recommended.
3.3. Queries
The data passed between PassPRNT and the host application is handled in the form of query parameters. The variable name and value are expressed using “=”, and the query must start with “?” to set the boundaries of the path. Multiple parameters can be linked by “&”, with no restriction on their order. Refer to the following for parameter settings.
While the query variable names do not recognize differences between upper case and lower case letters, setting using lower case letters is recommended.
Variable name |
Name |
---|---|
Printer Setting (iOSPortName) |
|
Printer Setting (Printer Type) |
|
Printer Setting (Timeout) |
|
Printing width |
|
Drawer activation instruction |
|
Drawer activation time |
|
Buzzer drive instructions |
|
Buzzer channel |
|
Number of buzzer sounds |
|
Buzzer drive time |
|
Buzzer delay time |
|
Instructs the melody speaker to play |
|
Storage area for sounds to be played by the melody speaker. |
|
Number of the sound to be played by the melody speaker. |
|
Melody speaker volume. |
|
Callback URL scheme |
|
Blackmark settings (Enable/Disable) |
|
Blackmark settings (Sensor position) 1 |
|
Gap settings (Enable/Disable) |
|
Paper cutting method |
|
Error detection pop-up settings (Enable/Disable) |
|
HTML format print layout data |
|
PDF format printing data |
|
URL where print data is placed |
- 1
Invalid with version 2.1 or later
Example of URL scheme including a query
starpassprnt://v1/print/nopreview?html=<Print Data>&size=3&drawer=ahead&back=<Callback URL>
3.3.1. port
Name |
Printer Setting (PortName) |
---|---|
Variable name |
port |
Variable value |
Data conforming to StarIO portName |
Default value |
The setting for “Printer” on the ‘Configuration’ screen. |
Conditions |
Optional, URL encoding compliant with RFC3986 is required |
Description |
Conforms to StarIO portName specifications.
If it is not specified, the setting for ‘Printer’ on the ‘Configuration’ screen is used.
If this is also not set, a communication test is performed with the first printer found by StarIO with
bt: set for ‘setting’. |
Error |
- |
3.3.2. settings
Name |
Printer Setting (Type) |
---|---|
Variable name |
settings |
Variable value |
Data conforming to StarIO portSettings |
Default value |
Determined by the printer model selected in “”Printer Configuration””. |
Conditions |
Optional, URL encoding compliant with RFC3986 is required |
Description |
Conforms to StarIO portSettings specifications.
Set according to the printer you are communicating with.
Please check Hardware Configuration for the setting value.
If it is not set, it automatically determines from the printer model selected in “”Printer Configuration””.
If this is also not set, a communication test is performed with the first printer found by StarIO with nothing (a blank entry) set for “port”.
|
Error |
- |
3.3.3. timeout
Name |
Printer Setting (Timeout) |
---|---|
Variable name |
timeout |
Variable value |
Data conforming to StarIO timeout |
Default value |
10 seconds (* for mobile printers : 20 seconds) |
Conditions |
Optional |
Description |
Conforms to StarIO timeout specifications.
Used as the timeout value for waiting until a status change from the printer is acquired, such as StarIO’s internal getPort or begin/end CheckedBlock.
If it is not specified, or the setting is invalid, the default value will be set.
If a write timeout (fixed value of 60 seconds) occurs, an error is issued.
|
Error |
This error occurs when the parameter is not set.
Code: 6
Text: ERROR_WRITE_FAILURE
Message: Timeout occurred while sending data
|
3.3.4. size
Name |
Printing width |
---|---|
Variable name |
size |
Variable value |
One of the following values: |
Default value |
|
Conditions |
Optional |
Description |
Specifies the printing paper width.
The printing image drawing size is adjusted based on this parameter. If it is not specified, or the setting is invalid,
3 (inches) will be set.The printing size corresponding to each variable is as follows.
For the printer’s print area setting, refer to the Memory Switch 4 specification or the
print_width key specification in the Star Configuration of each printer. |
Error |
- |
size |
1 |
2 |
2w1 |
2w2 |
2w3 |
2w4 |
2w5 |
2w6 |
2w7 |
3 |
3w |
3w2 |
4 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TSP650II |
- |
406
(50.8)
|
- |
- |
- |
- |
- |
- |
- |
576
(72)
|
- |
- |
- |
TSP700II |
- |
406
(50.8)
|
416
(52)
|
420
(52.5)
|
- |
- |
- |
- |
- |
576
(72)
|
640
(80)
|
- |
- |
TSP800II |
- |
- |
- |
- |
- |
- |
- |
- |
- |
576
(72)
|
- |
- |
832
(104)
|
FVP10 |
- |
406
(50.8)
|
416
(52)
|
420
(52.5)
|
- |
- |
- |
- |
- |
576
(72)
|
- |
- |
- |
BSC10 |
- |
406
(50.8)
|
- |
- |
360
(45)
|
- |
- |
- |
- |
576
(72)
|
- |
512
(64)
|
- |
TSP100IIIB |
- |
406
(50.8)
|
- |
- |
- |
- |
- |
- |
- |
576
(72)
|
- |
- |
- |
TSP100IIIW |
- |
406
(50.8)
|
- |
- |
- |
- |
- |
- |
- |
576
(72)
|
- |
- |
- |
TSP100IIILAN |
- |
406
(50.8)
|
- |
- |
- |
- |
- |
- |
- |
576
(72)
|
- |
- |
- |
TSP100IIIU |
- |
406
(50.8)
|
- |
- |
- |
- |
- |
- |
- |
576
(72)
|
- |
- |
- |
TSP100IV |
- |
406
(50.8)
|
- |
- |
- |
384
(48)
|
- |
- |
- |
576
(72)
|
- |
- |
- |
TSP100IV SK |
- |
406
(50.8)
|
- |
- |
- |
384
(48)
|
256
(32)
|
276
(34.5)
|
408
(51)
|
576
(72)
|
- |
- |
- |
SM-S210i |
- |
384
(48)
|
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
SM-S230i |
- |
384
(48)
|
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
SM-L200 |
- |
384
(48)
|
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
SM-T300i |
- |
- |
- |
- |
- |
- |
- |
- |
- |
576
(72)
|
- |
- |
- |
SM-L300 |
- |
- |
- |
- |
- |
- |
- |
- |
- |
576
(72)
|
- |
- |
- |
SM-T400i |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
832
(104)
|
mPOP |
- |
384
(48)
|
432
(54)
|
406
(50.8)
|
- |
- |
- |
- |
- |
- |
- |
- |
- |
mC-Print2 |
- |
384
(48)
|
432
(54)
|
406
(50.8)
|
- |
- |
- |
- |
- |
- |
- |
- |
- |
mC-Print3 |
- |
384
(48)
|
- |
406
(50.8)
|
- |
- |
- |
- |
- |
576
(72)
|
- |
- |
- |
mC-Label3 |
144
(18)
|
384
(48)
|
- |
406
(50.8)
|
- |
- |
256
(32)
|
276
(34.5)
|
408
(51)
|
576
(72)
|
- |
- |
- |
BSC10II |
- |
384
(48)
|
- |
406
(50.8)
|
- |
- |
- |
- |
408
(51)
|
576
(72)
|
- |
- |
- |
3.3.5. drawer
Name |
Drawer activation instruction |
---|---|
Variable name |
drawer |
Variable value |
One of the following values: off, ahead and after
off … Drawer OFFahead … Open before printingafter … Open after printing |
Default value |
The value set in “Configuration > Peripheral (Drawer, etc…)” |
Conditions |
Optional |
Description |
Instructs the drawer.
Drawer operation after printing is determined by this parameter.
If this parameter and “”buzzer”” or “”sound”” parameter are specified together, the default priority 2 will be followed.
If this parameter is not specified, or the setting is invalid, the setting for ‘Peripheral (Drawer, etc…)’ on the ‘Configuration’ screen is used.
This allows situations where the drawer is activated (without printing) even when a “html”, “pdf” or “url” query is not set.
If selecting drawer configuration as “”before printing”” and printer was offline, drawer is opened after recovering online except mPOP.
Note that this will be ignored when a mobile printer is selected.
|
Error |
- |
Warning
Do not use this parameter with anything other than the drawer connected.It may not work properly, and the printer or the peripheral unit in use may cause damage.
3.3.6. drawerpulse
Name |
Drawer activation time |
---|---|
Variable name |
drawerpulse |
Variable value |
One of the following values: 200, 500
200 … Activates the cash drawer for 200ms.500 … Activates the cash drawer for 500ms. |
Default value |
The value set in “Configuration > Peripheral (Drawer, etc…)” |
Conditions |
Optional |
Description |
Specifies the drawer activation time.
Activates the cash drawer for 200ms when the integral value of “200” or less is specified and for 500ms when the integral value more than “200” is specified.
If this parameter is not specified, or the setting is invalid, the setting for ‘Cut’ on the ‘Configuration’ screen is used.
If an invalid value is specified for this parameter, “200” will be used.
Note that this will be ignored when a mobile printer is selected.
|
Error |
- |
3.3.7. buzzer
Name |
Buzzer drive instructions |
---|---|
Variable name |
buzzer |
Variable value |
One of the following values: off, ahead and after
off … Buzzer OFFahead … Open before printingafter … Open after printing |
Default value |
The value set in “Configuration > Peripheral (Drawer, etc…)” |
Conditions |
Optional |
Description |
Indicates whether to enable/disable buzzer drive and its execution timing.
If this parameter and “”drawer”” or “”sound”” parameter are specified together, the default priority 2 will be followed.
If this parameter is not specified, or the setting is invalid, the setting for ‘Peripheral (Drawer, etc…)’ on the ‘Configuration’ screen is used.
This allows situations where the buzzer is driven (without printing) even when a “html”, “pdf” or “url” query is not set.
If selecting buzzer configuration as “before printing” and printer was offline, buzzer is driven after recovering online except mPOP.
Note that this will be ignored when a mobile printer is selected.
|
Error |
- |
Warning
Do not use this parameter with anything other than the buzzer connected.It may not work properly, and the printer or the peripheral unit in use may cause damage.
3.3.8. buzzerchannel
Name |
Buzzer channel |
---|---|
Variable name |
buzzerchannel |
Variable value |
Value of either
channel1 or channel2 channel1 … channel 1channel2 … channel 2 |
Default value |
The value set in “Configuration > Peripheral (Drawer, etc…)” |
Conditions |
Optional |
Description |
Set the buzzer channel.
If this parameter is not specified, or the setting is invalid, the setting for ‘Cut’ on the ‘Configuration’ screen is used.
If an invalid value is specified for this parameter,
channel1 is used.Note that this will be ignored when a mobile printer is selected.
|
Error |
- |
3.3.9. buzzerrepeat
Name |
Number of buzzer sounds |
---|---|
Variable name |
buzzerrepeat |
Variable value |
1 - 20 |
Default value |
The value set in “Configuration > Peripheral (Drawer, etc…)” |
Conditions |
Optional |
Description |
Sets the number of times the buzzer will sound.
If this parameter is not specified, or the setting is invalid, the setting for ‘Cut’ on the ‘Configuration’ screen is used.
If an invalid value is specified for this parameter, “200” will be used.
Note that this will be ignored when a mobile printer is selected.
|
Error |
- |
3.3.10. buzzerdrivetime
Name |
Buzzer drive time |
---|---|
Variable name |
buzzerdrivetime |
Variable value |
0 - 5100 (Unit [ms]) |
Default value |
The value set in “Configuration > Peripheral (Drawer, etc…)” |
Conditions |
Optional |
Description |
Specifies the buzzer drive time.
If an integer value less than or equal to 0 is specified, the buzzer will sound for 0 ms.if an integer value greater than 5100 is specified, the buzzer will sound for 5100 ms.
If this parameter is not specified, or the setting is invalid, the setting for ‘Cut’ on the ‘Configuration’ screen is used.
If an invalid value is specified for this parameter, “200” will be used.
Note that this will be ignored when a mobile printer is selected.
|
Error |
- |
3.3.11. buzzerdelaytime
Name |
Buzzer delay time |
---|---|
Variable name |
buzzerdelaytime |
Variable value |
0 - 5100 (Unit [ms]) |
Default value |
The value set in “Configuration > Peripheral (Drawer, etc…)” |
Conditions |
Optional |
Description |
Specifies the buzzer delay time.
If an integer value less than or equal to 0 is specified, the buzzer will be paused for 0 ms.If an integer value greater than 5100 is specified, the buzzer will be paused for 5100 ms.
If this parameter is not specified, or the setting is invalid, the setting for ‘Cut’ on the ‘Configuration’ screen is used.
If an invalid value is specified for this parameter, “200” will be used.
Note that this will be ignored when a mobile printer is selected.
|
Error |
- |
3.3.12. sound
Name |
Instructs the melody speaker to play |
---|---|
Variable name |
sound |
Variable value |
One of the following values: off, ahead and after
off … Melody speaker OFFahead … Open before printingafter … Open after printing |
Default value |
The value set in “Configuration > Peripheral (Drawer, etc…)” |
Conditions |
Optional |
Description |
Specifies the sound playback from the melody speaker.
This parameter is used to determine the melody speaker for printing.
If this parameter and “”buzzer”” or “”sound”” parameter are specified together, the default priority 2 will be followed.
If this parameter is not specified, or the setting is invalid, the setting for ‘Peripheral (Drawer, etc…)’ on the ‘Configuration’ screen is used.
This allows situations where the melody speaker playback will take place (without printing) even when a “html”, “pdf” or “url” query is not set.
If selecting melody speaker configuration as “before printing” and printer was offline, melody speaker will play a sound after recovering online.
Note that this will be ignored when a mobile printer is selected.
|
Error |
- |
Warning
Do not use this parameter with anything other than the melody speaker connected.It may not work properly, and the printer or the peripheral unit in use may cause damage.
3.3.13. soundstoragearea
Name |
Storage area for sounds to be played by the melody speaker. |
---|---|
Variable name |
soundstoragearea |
Variable value |
Value of either
area1 or area2 area1 … area1area2 … area2 |
Default value |
The value set in “Configuration > Peripheral (Drawer, etc…)” |
Conditions |
Optional |
Description |
Sets the area for the sound when played by the melody speaker.
When this parameter is set in a query, it must be specified at the same time as the “soundnumber” parameter.
If this parameter is not specified, or the setting is invalid, the setting for ‘Cut’ on the ‘Configuration’ screen is used.
If an invalid value is specified for this parameter, the DIP switch setting of the melody speaker itself will be used.
Note that this will be ignored when a mobile printer is selected.
|
Error |
- |
3.3.14. soundnumber
Name |
Number of the sound to be played by the melody speaker. |
---|---|
Variable name |
soundnumber |
Variable value |
1 - 7 |
Default value |
The value set in “Configuration > Peripheral (Drawer, etc…)” |
Conditions |
Optional |
Description |
Sets the number of the sound to be played by the melody speaker.
When this parameter is set in a query, it must be specified at the same time as the “soundstoragearea” parameter.
If this parameter is not specified, or the setting is invalid, the setting for ‘Cut’ on the ‘Configuration’ screen is used.
If an invalid value is specified for this parameter, the DIP switch setting of the melody speaker itself will be used.
Note that this will be ignored when a mobile printer is selected.
|
Error |
- |
3.3.15. soundvolume
Name |
Melody speaker volume. |
---|---|
Variable name |
soundvolume |
Variable value |
0 - 15 |
Default value |
The value set in “Configuration > Peripheral (Drawer, etc…)” |
Conditions |
Optional |
Description |
Specifies the drawer activation time.
If an integer value less than or equal to 0 is specified, it will operate as volume 0. If an integer value greater than 15 is specified, it will operate as volume 15.Activates the cash drawer for 200ms when the integral value of “200” or less is specified and for 500ms when the integral value more than “200” is specified.
If this parameter is not specified, or the setting is invalid, the setting for ‘Cut’ on the ‘Configuration’ screen is used.
If an invalid value is specified for this parameter, the DIP switch setting of the melody speaker itself will be used.
Note that this will be ignored when a mobile printer is selected.
|
Error |
- |
Note
- 2
Only one of “drawer”, “buzzer”, and “sound” can be specified. If more than one is specified, the parameter to be used will be determined according to the following priority order.
Priority
Parameter
1
drawer
2
buzzer
3
sound
4
The value set in “Configuration > Peripheral (Drawer, etc…)”
3.3.16. back
Name |
Callback URL scheme |
---|---|
Variable name |
back |
Variable value |
URL scheme for the application performing the callback |
Default value |
- |
Conditions |
Required, URL encoding compliant with RFC3986 is required |
Description |
Used for callback (returning) to the specified application after printing completes.
When the callback is made, a query consisting of the printing result and any error codes and messages is appended.
Further details can be found later in this manual.
|
Error |
This error occurs when the parameter is not set.
Code: 2
Text: ERROR_INVALID_CALLBACK_DATA
Message: Callback parameter not set
|
3.3.17. blackmark
Name |
Blackmark settings (Enable/Disable) |
---|---|
Variable name |
blackmark |
Variable value |
One of the following values: disable, enable, enableAndDetectAtPowerOn
disable … Disables the blackmark settingenable … Enables the blackmark settingenableAndDetectAtPowerOn … Enables the blackmark setting. Also detects the blackmark position when printing after the power has been turned on. |
Default value |
- |
Conditions |
Optional |
Description |
Blackmark settings are configured immediately before printing starts based on this parameter.
If it is not specified, or the setting was invalid, this query is ignored and it continues the settings from immediately before printing.
This query is supported by TSP700II, TSP800II, FVP10 and mC-Label3. These settings are ignored by the other models.
These settings are cleared when the printer is turned OFF. The host application must be set appropriately.
Do not use this parameter together with the “gap” parameter.
If blackmark detection fails, an error (1) is issued.
|
Error (1) |
An error if there is a blackmark detection failure
Code: 13
Character string: ERROR_BLACKMARK_DETECTION
Message: Paper separation could not be detected
|
Blackmark supported models |
TSP700II, TSP800II, FVP10, mC-Label3 |
Blackmark supported models
(Set by the memory switch 3 )
|
SM-S210i/S230i, SM-T300i/T300DB/T400i, SM-L200/L300 |
Blackmark unsupported models |
TSP650II、TSP100IIIBI/W/LAN/U、TSP100IV、TSP100IV SK、mPOP、mC-Print2、mC-Print3、BSC10、BSC10II |
- 3
With Version 2.1 or later, the blackmark setting of mobile printers is set by the memory switch of the printer. Please refer to the hardware manual of each product for the setting method.
3.3.18. bmposition
With Version 2.1 or later, the blackmark setting of mobile printers 4 is set by the memory switch of the printer.
Therefore, this query is invalid with Version 2.1 or later, if specified.
Please refer to the hardware manual of each product for the blackmark setting method of the memory switch.
- 4
Applicable models: SM-S210i / S230i, SM-T300i / T400i, SM-L200 / L300
3.3.19. gap
Name |
Gap detection setting for die-cut label paper, etc. (Enable/Disable) |
---|---|
Variable name |
gap |
Variable value |
One of the following values: disable, enable, enableAndDetectAtPowerOn
disable … Disables gap detection.enable … Enables gap detection.enableAndDetectAtPowerOn … Enables gap detection. Also detects the gap position when printing after the power has been turned on. |
Default value |
- |
Conditions |
Optional |
Description |
Gap detection settings for die-cut label paper, etc. are made based on this parameter just before printing starts.
If it is not specified, or the setting was invalid, this query is ignored and it continues the settings from immediately before printing.
This query is supported by mC-Label3. These settings are ignored by the other models.
These settings are cleared when the printer is turned OFF. The host application must be set appropriately.
Do not use this parameter together with the “blackmark” parameter.
If gap detection fails, an error (1) is issued.
|
Error (1) |
An error if there is a gap detection failure
Code: 13
Character string: ERROR_BLACKMARK_DETECTION
Message: Paper separation could not be detected
|
Gap detection setting supported models |
mC-Label3 |
Gap detection setting unsupported models |
TSP650II、TSP700II、TSP800II、FVP10、TSP100IIIBI/W/LAN/U、TSP100IV、TSP100IV SK、mPOP、mC-Print2、mC-Print3、BSC10、BSC10II、SM-S210i/S230i、SM-T300i/T300DB/T400i、SM-L200/L300 |
3.3.20. cut
Name |
Paper cutting method |
---|---|
Variable name |
cut |
Variable value |
One of the following values: partial, full, tearbar, nocut
partial … Executes a partial cut + paper feed.full … Executes a full cut + paper feed.tearbar … Feeds paper to the tear bar position.nocut … Does not execute paper feed or paper cut. |
Default value |
partial |
Conditions |
Optional |
Description |
Specifies the paper cut type after printing.
If this parameter is not specified, or the setting is invalid, the setting for ‘Cut’ on the ‘Configuration’ screen is used.
For the printers below, some parameters are not supported.
* TSP650II / TSP100III series / TSP100IV / TSP100IV SK / mC-Print3 / BSC10II
the Cut is set to partial cut even when
Full is selected.* BSC10
the Cut is set to partial cut even when
Full or Tear bar is selected.* Mobile printer
paper is fed to the tear bar position even when
Partial or Full is selected. |
Error |
- |
3.3.21. popup
Name |
Error detection pop-up settings (Enable/Disable) |
---|---|
Variable name |
popup |
Variable value |
enable, disable |
Default value |
enable |
Conditions |
Optional |
Description |
When errors are detected during the printing process, a pop-up displaying the error status is displayed.
Use
enable / disable to specify the settings of this display.If it is not specified, or the setting is invalid,
enable will be specified. |
Error |
- |
3.3.22. html
Name |
HTML format print layout data |
---|---|
Variable name |
html |
Variable value |
Data described in accordance with html5 specifications |
Default value |
- |
Conditions |
Required (*1, *2), URL encoding compliant with RFC3986 is required
*1 - As an exception, if “drawer=ahead” or “drawer=after” is being executed at the same time, the operation will still occur even if this parameter is not set (for cases when there is no printing but the cash drawer is opened).
*2 - Set only one of the “html”, “pdf” or “url” query for printing data or this query.
|
Description |
When the html-based data is received by PassPRNT, the printing image is generated internally, and then converted to raster data. The results of that are converted to a command system which can be used for printing on a Star printer.
The maximum length of the layout data is 1 meter (8,000 pixels). When this limit is exceeded, Error (1) is issued.
This parameter, “pdf” or “url” is required, and if it is not set, Error (2) is issued.
Cautions
For data passed from the host application side (especially the printing layout data of a “html” or “pdf” query etc.) through linkage between the application, set the lowest possible OS memory limitation. When data that exceeds the usable memory size is sent from the host application, the OS may not operate successfully (does not switch to PassPRNT).
|
Error (1) |
This error occurs when the maximum printing length is exceeded.
Code: 3
Text: ERROR_INVALID_DATA_LENGTH
Message: Print data has exceeded the upper limit
|
Error (2) |
This error occurs when the parameter is not set.
Code: 9
Text: ERROR_INVALID_RECEIPT_DATA
Message: No print data
|
Important
Consecutive digits (such as telephone numbers) in printing layout data may be unintentionally formatted with underlines by the automatic linking function. To avoid this phenomenon, add the following structure to disable the automatic link function for telephone numbers.
<meta name="format-detection" content="telephone=no">
3.3.23. pdf
Name |
PDF file format printing data |
---|---|
Variable name |
|
Variable value |
PDF file format printing data |
Default value |
- |
Conditions |
Required (*1, *2), Base64 data format and URL encoding compliant with RFC3986 are required
*1 - As an exception, if “drawer=ahead” or “drawer=after” is being executed at the same time, the operation will still occur even if this parameter is not set (for cases when there is no printing but the cash drawer is opened).
*2 - Set only one of the “html”, “pdf” or “url” query for printing data or this query.
|
Description |
The host application side changes the PDF data to binary data using the base64 format, and the result of the encoded URL is appended to this query.
When PassPRNT accepts the data, the URL is decoded -> Base64 is decoded, and then the PDF image is reconstructed. Then, the PDF printing image is converted to RasterData internally. As a result, it converts to the printable command system on the Star printer.
The maximum length of the layout data is 1 meter (8,000 pixels) (*3). When this limit is exceeded, Error (1) is issued.
This parameter, “html” or “url” is required, and if it is not set, Error (2) is issued.
If a format data other than a PDF is appended, Error (3) is issued.
*3 - The calculation method of the printing length from the PDF data paper size (resolution) is as follows.
Printing length (vertical) = (pdf vertical resolution) × (query ‘size’)/(pdf horizontal resolution).
Cautions
For data passed from the host application side (especially the printing layout data of a “html” or “pdf” query etc.) through linkage between the application, set the lowest possible OS memory limitation. When data that exceeds the usable memory size is sent from the host application, the OS may not operate successfully (does not switch to PassPRNT).
For PDF data, only 1 page will be printed. If printing multiple pages, send the data for each page from the host application.
|
Error (1) |
This error occurs when the maximum printing length is exceeded.
Code: 3
Text: ERROR_INVALID_DATA_LENGTH
Message: Print data has exceeded the upper limit
|
Error (2) |
This error occurs when the parameter is not set.
Code: 9
Text: ERROR_INVALID_RECEIPT_DATA
Message: No print data
|
Error (3) |
An error if the file format settings are not supported
Code: 14
Character string: ERROR_NONSUPPORTED_FILEFORMAT
Message: Non-compatible file format
|
3.3.24. url
Name |
URL where print data is placed |
---|---|
Variable name |
url |
Variable value |
URL where print data is placed |
Default value |
- |
Conditions |
Required (*1, *2), URL encoding compliant with RFC3986 is required
*1 - As an exception, if “drawer=ahead” or “drawer=after” is being executed at the same time, the operation will still occur even if this parameter is not set (for cases when there is no printing but the cash drawer is opened).
*2 - Set only one of the “html”, “pdf” or “url” query for printing data or this query.
|
Description |
Specify the URL of the HTML or PDF you want to print.
Star PassPRNT downloads HTML or PDF data of the specified URL, and the printing image is generated internally, and then converted to raster data.
The maximum length of the layout data is 1 meter (8,000 pixels). When this limit is exceeded, Error (1) is issued.
This parameter, “pdf” or “url” is required, and if it is not set, Error (2) is issued.
If the URL destination data is not HTML or PDF with UTF-8, Error (3) is issued.
If data download fails, Error (4) is issued.
|
Error (1) |
This error occurs when the maximum printing length is exceeded.
Code: 3
Text: ERROR_INVALID_DATA_LENGTH
Message: Print data has exceeded the upper limit
|
Error (2) |
This error occurs when the parameter is not set.
Code: 9
Text: ERROR_INVALID_RECEIPT_DATA
Message: No print data
|
Error (3) |
An error if the file format settings are not supported
Code: 14
Character string: ERROR_NONSUPPORTED_FILEFORMAT
Message: Non-compatible file format
|
Error (4) |
This error occurs when failed to download print data.
Code: 16
Text: ERROR_FAILED_TO_DOWNLOAD
Message: Failed to download print data
|
3.4. Error Codes
For errors that occur while PassPRNT is processing printing, the displayed codes and messages for those errors are defined as shown below. The codes and messages are appended to the query for the callback from PassPRNT. The host application can then reference these values to determine the outcome of the printing. Reasons for printing failure can also be determined. The variable name of the error code is “passprnt_code”, and the variable name of the error message is “passprnt_message”.
The error code and message appended at the time of the callback is for the final result only. For example, if at the beginning of printing, a no paper error occurred, but then reprinting is selected and succeeds, only the “Success” judgment is notified.
An example of a callback URL scheme with an error code appended is shown below.
sampleapp://action?passprnt_code=0&passprnt_message=SUCCESS
Only when FileMakerGo (URL scheme “fmp://”) is specified as the host application will “$” be appended to the beginning of the variable names of error codes and error messages from FileMakerGo specifications, and then be notified.
Code |
Text |
Message |
|
---|---|---|---|
0 |
SUCCESS |
Success |
|
1 |
ERROR_INVALID_PATH |
Path is invalid |
|
2 |
ERROR_INVALID_CALLBACK_DATA |
Callback parameter not set |
|
3 |
ERROR_INVALID_DATA_LENGTH |
Print data has exceeded the upper limit |
|
4 |
ERROR_GETPORT_FAILURE |
Device connection error |
|
5 |
ERROR_DEVICE_OFFLINE_BEGINCHECKEDBLOCK |
The device is offline |
|
6 |
ERROR_WRITE_FAILURE |
Timeout occurred while sending data |
|
7 |
ERROR_DEVICE_OFFLINE_ENDCHECKEDBLOCK |
The device is offline |
|
8 |
ERROR_PORTEXCEPTION |
PORTEXCEPTION error |
|
9 |
ERROR_INVALID_RECEIPT_DATA |
No print data |
|
10 |
ERROR_PROCESS_CANCELED |
Process was canceled |
|
11 |
ERROR_ILLEGALARGUMENT_EXCEPTION |
Failed to generate image data |
|
12 |
ERROR_OUTOFMEMORY_ERROR |
Failed to generate image data |
|
13 |
ERROR_BLACKMARK_DETECTION |
Black mark could not be detected |
|
14 |
ERROR_NONSUPPORTED_FILEFORMAT |
Non-compatible file format |
|
15 |
ERROR_INSUFFICIENT_SETTINGS |
Settings are missing |
|
16 |
ERROR_FAILED_TO_DOWNLOAD |
Failed to download print data |
3.4.1. Error Code: 0
Code |
0 |
---|---|
Text |
SUCCESS |
Message |
Success |
Description |
This is issued when the printing operation is successful. |
Pop-up message |
- |
Solution |
- |
3.4.2. Error Code: 1
Code |
1 |
---|---|
Text |
ERROR_INVALID_PATH |
Message |
Path is invalid |
Description |
Issued when a path not conforming to standard values is received.
This judgment is performed immediately after switching to PassPRNT.
When an error occurs, subsequent processes are canceled, and then a pop-up message is displayed while a notification (callback) for this error is made to the host application.
|
Pop-up message |
Path is invalid |
Solution |
Use the URL scheme to set a correct path. |
3.4.3. Error Code: 2
Code |
2 |
---|---|
Text |
ERROR_INVALID_CALLBACK_DATA |
Message |
Callback parameter not set |
Description |
Issued when the callback parameter is not set.
Since printing processes are prioritized, judgment is performed when printing is completed (immediately before callback processing).
If an error occurs, the PassPRNT Configuration screen is opened, and an error pop-up message is displayed. Since the callback destination is unclear, this error cannot be received by the host application.
|
Pop-up message |
Callback parameter not set |
Solution |
Set an URL-encoded value for the callback parameter. |
3.4.4. Error Code: 3
Code |
3 |
---|---|
Text |
ERROR_INVALID_DATA_LENGTH |
Message |
Print data has exceeded the upper limit |
Description |
This error is issued when layout data greater than the standard length (1 meter, or about 8,000 pixels) is sent.
This judgment is performed immediately after switching to PassPRNT.
When an error occurs, subsequent processes are canceled, and then a pop-up message is displayed while a notification (callback) for this error is made to the host application.
|
Pop-up message |
Print data has exceeded the upper limit |
Solution |
Set layout data less than 1 meter (8,000 pixels) in length. |
3.4.5. Error Code: 4
Code |
4 |
---|---|
Text |
ERROR_GETPORT_FAILURE |
Message |
Device connection error |
Description |
This error is issued when StarIO.getPort is executed using the values for “port”, “settings”, and “timeout” or the setting on the settings screen, and a failure occurs as a result.
This judgment is executed at the first stage of the printing process.
If an error occurs, a pop-up message with buttons to retry or cancel is displayed. If ‘Cancel’ is selected, subsequent processes are canceled and a notification (callback) for this error is made to the host application.
|
Pop-up message |
Device connection error |
Solution |
Check that the printer’s power is ON and pairing using Bluetooth is set.
Select a printer correctly from the settings screen or with a URL scheme (port, settings).
|
3.4.6. Error Code: 5
Code |
5 |
---|---|
Text |
ERROR_DEVICE_OFFLINE_BEGINCHECKEDBLOCK |
Message |
The device is offline |
Description |
This is issued when, in the step following success for StarIO.getPort, the printer’s status is offline.
This judgment is executed at the second stage of the printing process (before printing data is sent).
If an error occurs, a pop-up message with buttons to retry or cancel is displayed. If ‘Cancel’ is selected, subsequent processes are canceled and a notification (callback) for this error is made to the host application.
|
Pop-up message |
When cover is open
The device is offline
Please close the cover
When paper is out
The device is offline
Please load paper
When paper is held
The device is offline
Please remove the printed paper
When the paper drops out
The device is offline
Please check the paper position
When the paper is jammed
The device is offline
Please remove the jammed paper
|
Solution |
Check that the printer is turned on and that it is not in an error state. If the printer’s paper taken control is enabled, check that the printer is not holding the paper. |
3.4.7. Error Code: 6
Note
This error is issued only iOS version.
Code |
6 |
---|---|
Text |
ERROR_WRITE_FAILURE |
Message |
Timeout occurred while sending data |
Description |
This error is issued if StarIO.writeport continues for more than a fixed time 5 .
However, the following processes as long as the OS continues the write processing, and therefore this error may not occur even if the fixed time is exceeded. In such cases, this error will be issued if the OS has finished processing and the write data still remains.
This judgment is executed at the third stage of the printing process (while printing data is being sent).
If an error occurs, subsequent processes are canceled and a notification (callback) for this error is made to the host application.
|
Pop-up message |
Timeout occurred while sending data |
- 5
60 seconds for Bluetooth and 150 seconds for BLE communication.
3.4.8. Error Code: 7
Code |
7 |
---|---|
Text |
ERROR_DEVICE_OFFLINE_ENDCHECKEDBLOCK |
Message |
The device is offline |
Description |
This is issued when, during printing completion monitoring, the printer’s status is offline.
This judgment is executed at the fourth stage of the printing process (during printing until monitoring of printing completion).
If an error occurs, a pop-up message with buttons to retry or cancel is displayed. If ‘Cancel’ is selected, subsequent processes are canceled and a notification (callback) for this error is made to the host application.
|
Pop-up message |
When cover is open
The device is offline
Please close the cover
When paper is out
The device is offline
Please load paper
When the paper drops out
The device is offline
Please check the paper position
When the paper is jammed
The device is offline
Please remove the jammed paper
|
Solution |
Check that the printer’s power is ON, that it is not in an error state, |
3.4.9. Error Code: 8
Code |
8 |
---|---|
Text |
ERROR_PORTEXCEPTION |
Message |
PORTEXCEPTION error |
Description |
Issued during a printing process.
When an error occurs, subsequent processes are canceled, and then a pop-up message is displayed while a notification (callback) for this error is made to the host application.
|
Pop-up message |
PORTEXCEPTION error |
Solution |
Check that the printer’s power is ON, that it is not in an error state, and that pairing using Bluetooth is set. |
3.4.10. Error Code: 9
Code |
9 |
---|---|
Text |
ERROR_INVALID_RECEIPT_DATA |
Message |
No print data |
Description |
Issued when the printing data is not set.
However, an exception is made if “drawer=ahead” or “drawer=after” is being executed at the same time (for cases when there is no printing but the cash drawer is opened).
This judgment is performed immediately after switching to PassPRNT.
When an error occurs, subsequent processes are canceled, and then a pop-up message is displayed while a notification (callback) for this error is made to the host application.
|
Pop-up message |
No print data |
Solution |
Set printing layout data using URL encoding to the URL scheme. |
3.4.11. Error Code: 10
Note
This error is issued only Android version.
Code |
10 |
---|---|
Text |
ERROR_PROCESS_CANCELED |
Message |
Process was canceled |
Description |
This error is issued when the printing process has been canceled.
This error is sent to the host application (callback).
This error will occur if the application is interrupted due to a user’s operation (holding the home button and the power button), and then the operating system cancels processing the data.
Do not interrupt the processing operation during printing by pressing the home button or power button, etc.
|
Pop-up message |
Process was canceled (* Displayed with a toast notification) |
Solution |
Check that the printer is ON, there are no errors, and the printer is paired with the device via Bluetooth, and then resend the data from the host application. |
3.4.12. Error Code: 11
Note
This error is issued only Android version.
Code |
11 |
---|---|
Text |
ERROR_ILLEGALARGUMENT_EXCEPTION |
Message |
Failed to generate image data |
Description |
This error is issued when converting HTML data into image data fails.
When an error occurs, subsequent processes are canceled, and then a pop-up message is displayed while a notification (callback) for this error is made to the host application.
|
Pop-up message |
Failed to generate image data |
Solution |
Memory usage in OS and CPU utilization affects this process. Try again by the host application after closing unnecessary applications and reducing device usage. |
3.4.13. Error Code: 12
Note
This error is issued only iOS* / Android version.
*iOS Star PassPRNT V2.4.2 or later
Code |
12 |
---|---|
Text |
ERROR_OUTOFMEMORY_ERROR |
Message |
Failed to generate image data |
Description |
This error is issued when converting image data into printing command data fails.
When an error occurs, subsequent processes are canceled, and then a pop-up message is displayed while a notification (callback) for this error is made to the host application.
|
Pop-up message |
Failed to generate image data |
Solution |
Memory usage in OS and CPU utilization affects this process. Try again by the host application after closing unnecessary applications and reducing device usage. |
3.4.14. Error code: 13
Code |
13 |
---|---|
Text |
ERROR_BLACKMARK_DETECTION |
Message |
Paper separation could not be detected |
Description |
This error is issued when the printer encounters a paper-break detection error during end-of-print monitoring.
This judgment is executed at the fourth stage of the printing process (during printing until monitoring of printing completion).
If an error occurs, a pop-up message with buttons to retry or cancel is displayed. If ‘Cancel’ is selected, subsequent processes are canceled and a notification (callback) for this error is made to the host application.
|
Pop-up message |
Paper separation could not be detected |
Solution |
Blackmark supported models
Check that the blackmark paper is set correctly.
Print Media Settings supported models
Check that the print media settings are configured correctly.
|
3.4.15. Error code: 14
Code |
14 |
---|---|
Text |
ERROR_NONSUPPORTED_FILEFORMAT |
Message |
Non-compatible file format |
Description |
This message is issued when an unspecified data format has been sent.
This judgment is performed immediately after switching to PassPRNT.
When an error occurs, subsequent processes are canceled, and then a pop-up message is displayed while a notification (callback) for this error is made to the host application.
|
Pop-up message |
Non-compatible file format |
Solution |
Check that the supported format of the data is set. |
3.4.16. Error Code: 15
Note
This error is issued only PassPRNT for Android version 2.1 or before.
Code |
15 |
---|---|
Text |
ERROR_INSUFFICIENT_SETTINGS |
Message |
Settings are missing |
Description |
Issued if settings requested by PassPRNT are insufficient.
This judgment is performed immediately after switching to PassPRNT.
When an error occurs, subsequent processes are canceled, and then a pop-up message is displayed while a notification (callback) for this error is made to the host application.
|
Pop-up message |
Settings are missing |
Solution |
Check that the settings are configured correctly. |
3.4.17. Error Code: 16
Code |
16 |
---|---|
Text |
ERROR_FAILED_TO_DOWNLOAD |
Message |
Failed to download print data |
Description |
This error is issued when print data download fails includes the following reasons:
* Malformed URL.
* Connection or download timed out (after 30 seconds.).
* Download data included in response is null.
* HTTP status code is not “200 OK”.
* Server certificate verification failed.
When an error occurs, subsequent processes are canceled, and then a pop-up message is displayed while a notification (callback) for this error is made to the host application.
|
Pop-up message |
Failed to download print data |
Solution |
Make sure that the correct URL is set in the query key “url”.
Check the communication status with the server where the data is stored.
|
3.4.18. Error Code: 1000
Note
This error is issued only Android version.
Code |
1000 |
---|---|
Text |
ERROR_BLUETOOTH_PERMISSIONS_NOT_GRANTED |
Message |
Bluetooth permissions not granted |
Description |
This message is displayed when the PassPRNT application is unable to obtain Bluetooth authorization.
* When the Bluetooth authorization dialog appears and “Deny” is selected.
* Selected “Deny” multiple times for the Bluetooth authorization dialog that was displayed in the past.
When an error occurs, subsequent processes are canceled, and then a pop-up message is displayed while a notification (callback) for this error is made to the host application.
|
Pop-up message |
Bluetooth permissions not granted |
Solution |
Quit the PassPRNT application and re-launch it.
When the Bluetooth authorization dialog appears, select “Allow”.
If it does not appear, open the Android Settings screen and enable Bluetooth authorization for the PassPRNT app.
|