Professional Documents
Culture Documents
Star PassPRNT
(For iOS)
Software Manual
Rev. 1.2.0
1
Rev. 1.2.0
Revision History
Rev. No.
1.0.0
Changes
First edition
Date of Revision
Sep. 18, 2015
portable printers
1.2.0
Rev. 1.2.0
Contents
1.
Introduction...................................................................................................................... 4
1-1
2.
Functions ......................................................................................................................... 8
2-1
2-2
2-3
2-4
3-2
Path ........................................................................................................................ 15
3-3
Queries................................................................................................................... 16
1.
html......................................................................................................................... 17
2.
size ......................................................................................................................... 18
3.
drawer .................................................................................................................... 19
4.
port ......................................................................................................................... 19
5.
settings ................................................................................................................... 20
6.
timeout ................................................................................................................... 20
7.
back ........................................................................................................................ 21
3-4
Terminology ................................................................................................................... 28
Rev. 1.2.0
1. Introduction
Star PassPRNT (hereafter referred to as PassPRNT) is a printing application made by Star
Micronics co., Ltd..
PassPRNT is called by the host application using a URL scheme, accepts the printing data,
and then outputs it to a Star Micronics-brand printer.
This manual describes the functions of PassPRNT and the application interactions between
PassPRNT and the host application.
The application interaction of this software uses the iOS standard URL scheme (including
path and query). The printing layout is defined using HTML. Other printer settings use the
queries described in this manual. Accordingly, this manual is intended for application/system
developers who use HTML and Objective-C. A basic understanding of HTML and
Objective-C are assumed for the users of this manual and software.
Note that the content of this manual applies to Star PassPRNT(for iOS) Ver.1.3, and will be
updated on an ongoing basis as the application is updated.
Rev. 1.2.0
1-1
Functions of PassPRNT
Selecting 'Print' will start the software in conjunction with the host application. After
printing is completed, the host application is automatically displayed. (After printing
is completed, PassPRNT will send any error codes to the host application.)
ii.
B) Functions
In the iOS environment, PassPRNT is called by the host application using a URL
scheme, accepts the printing data, and then prints to a Star Micronics-brand printer. In
its initial state, after the printing data is received from the host application, the star logo
and a QR Code will be granted print. An in-app payment will allow this granted printing
data to be removed.
C) Setting Method
i.
Printer Settings
There are two setting methods:
settings screen, or settings can be configured using queries from the host
application. Settings made using queries are given priority. For information on
making settings using queries, refer to "3-3 Queries".
1)
Printer Designation
(a) Designation of printer type ("Desktop"/"Portable"/"mPOP")
(b) Printer Selection
(c) Automatic selection of emulation (only when a portable printer is selected)
2)
ii.
Rev. 1.2.0
D) Screen Configuration
i.
Printer Configuration
On the settings screen, the settings described in C)-i can be made.
1)
View/select a printer from a list of available printers (The 'Search' function can
be used)
(1) Display search results for the selected printer type
selected
2)
Rev. 1.2.0
*The settings made (shown below) are saved in the application until it is
uninstalled.
ii.
Item
Screen
Default value
Type
Desktop
Desktop
Printer
NONE
NONE
Drawer
Off
Off
E) Languages
This application supports the following 2 languages. If the language setting on this
device is not set to Japanese, it will be set to English.
- Japanese
- English
F)
Cautions
i.
During printing
<Data storage period>
The period from when PassPRNT is launched by the host application until the
transition back to the host application.
<Reusability>
The received printing data cannot be printed unless there are instructions from the
user (select "retry" during printing).
<Canceling Application>
Do not hold down the "home" button to cancel the operation when printing. If the
application has been canceled, the operating system may close the application
even when printing. Therefore, the printing result cannot be sent to the host
application.
ii.
Rev. 1.2.0
2. Functions
2-1
1.
2.
4.
3.
Host
application
Host device
Printer
"Host application", "PassPRNT", and "Printer" exist as players in the processing. The host
application and PassPRNT are installed in the host device. Data communication between
the host device and printer is done using Bluetooth.
The key processes that occur at the time of printing are described below from the viewpoint
of the data flowing between the players.
Data specifications are described later in this manual.
1.
In the host application, printing data (HTML) for PassPRNT is generated, and a
URL scheme is used to send the data to PassPRNT. (*At this time the OS
automatically switches screens from the host application to PassPRNT.)
2.
3.
After the printing data is sent, PassPRNT monitors the printer's status to determine
whether the printing was successful or not. (*The paper loading status and any
opened covers are also monitored, and when an error occurs, the retry/cancel
screen is displayed so that the printing process can be attempted again.)
4.
When switching back to the host application from PassPRNT, printing success
judgment result data is generated and sent to the host application at the time of the
switch.
8
Rev. 1.2.0
2-2
Hardware Configuration
The Hardware Configuration consists of the printing device ("Printer") and the device on
which PassPRNT is installed ("Host device"). These devices connect and communicate
using Bluetooth.
<Compatible Printers>
Model
Emulation
Firmware Version
Communication Interface
SM-S210i
(Japan model only)
StarPRNT
3.0 or later
Bluetooth
ESC/POS
2.5 or later
Bluetooth
SM-S220i
(EU/US model only)
StarPRNT
3.0 or later
Bluetooth
ESC/POS
2.1 or later
Bluetooth
SM-S230i
(EU/US model only)
StarPRNT
3.0 or later
Bluetooth
ESC/POS
1.0 or later
Bluetooth
StarPRNT
3.0 or later
Bluetooth
ESC/POS
2.5 or later
Bluetooth
StarPRNT
3.0 or later
Bluetooth
ESC/POS
2.5 or later
Bluetooth
SM-L200
StarPRNT
1.1 or later
TSP650II
Star Line
2.1 or later
Bluetooth
TSP700II
Star Line
5.1 or later
Bluetooth
TSP800II
Star Line
2.1 or later
Bluetooth
mPOP
StarPRNT
1.0.1 or later
Bluetooth
SM-T300i
SM-T400i
To change emulation for a portable printer from ESC/POS to StarPRNT, refer to the
procedure below.
You can check the current emulation setting in the connection status of the settings
screen
Rev. 1.2.0
10
Rev. 1.2.0
Host devices (iOS devices) compatible with the printers are shown in the table below.
Compatible OS versions are listed for each host device.
<Compatible Host Devices>
Device
iPad 2
iOS
7.0 or later
7.0 or later
7.0 or later
iPad Air
7.0 or later
iPad Air 2
7.0 or later
iPad mini
7.0 or later
iPad mini 2
7.0 or later
iPad mini 3
7.0 or later
iPhone 4s
7.0 or later
iPhone 5
7.0 or later
iPhone 5s
7.0 or later
iPhone 5c
7.0 or later
iPhone 6
7.0 or later
iPhone 6 Plus
iPod touch (5th generation)
7.0 or later
7.0 or later
Note: iPad, iPhone, iPod, and iPod touch are registered trademarks of Apple Inc. in
the United States and/or other countries. iPad Air and iPad mini are trademarks
of Apple Inc. The trademark "iPhone" is used under license from Aiphone Co.,
Ltd. iOS is a trademark or registered trademark of Cisco in the United States
and/or other countries and is used under license.
11
Rev. 1.2.0
2-3
Software Configuration
The software configuration for this product is the OS of the host device, which should be iOS
version 7.0 or later.
2-4
PassPRNT Screens
The various parts that make up PassPRNT are described here according to the screen they
are displayed on.
"Configuration" Screen
This is the screen shown when the application is started.
The printer to be used is selected and set by the user on this screen. The description of
each part of this screen is provided below.
12
Rev. 1.2.0
"Payment" Screen
After starting the application, selecting tab at the bottom of the screen will display this
screen.
This screen is for purchasing the cancel of the Star advertisement automatically granted
print at the end of the printing data.
The description of each display/button of this screen is provided below.
Purchase the
functionality
*Input of account ID and
password may be
required.
Describes the
functionality of the
purchase.
Back to the
"Configuration"
screen.
13
Rev. 1.2.0
14
Rev. 1.2.0
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.
3-1
URL scheme
starpassprnt://
When the host application call this URL scheme, iOS 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
Objective-C.
[[UIApplicationsharedApplication]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
(1) URL Version:
The URL Version is defined using (1) described above, with flexibility ensured by retaining
the functionality of the old version and specifying the functional enhancement of the new
version. The (2) 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 (2), the functions of (3) are subdivided as well. The applicable path
setting in this case is:
v1/print/nopreview
15
Rev. 1.2.0
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. An "&" between values allows linking of
multiple values, with no restriction on their order. Refer to the following for parameter
settings.
While the query settings do not recognize differences between upper case and lower case
letters, setting using lower case letters is recommended.
<Query List>
Variable name
Name
1.
html
2.
size
Print size
3.
drawer
4.
port
5.
settings
6.
timeout
7.
back
16
Rev. 1.2.0
1. html
Name
Variable
html
name
Variable
value
Default
value
Conditions
Description
Error (1)
Text: ERROR_INVALID_DATA_LENGTH
Message:
Error (2)
Text: ERROR_INVALID_RECEIPT_DATA
Message:
<Cautions>
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">
17
Rev. 1.2.0
2. size
Name
Variable
name
Variable
value
Default
value
Printing width
size
Conditions
Optional
Description
size
TSP650II
TSP700II
TSP800II
SM-S210i
SM-S220i
SM-S230i
SM-L200
Error
2w1
2w2
406
(50.8)
406
(50.8)
416
(52)
420
(52.5)
384
(48)
384
(48)
384
(48)
384
(48)
3w
dot
(mm)
4
576
(72)
576
(72)
576
(72)
640
(80)
832
(104)
SM-T300i
576
(72)
SM-T400i
832
(104)
mPOP
384
(48)
432
(54)
406
(50.8)
18
Rev. 1.2.0
3. drawer
Name
Variable
name
drawer
Variable
value
Drawer OFF
Default
value
Conditions
Optional
Description
Error
4. port
Name
Variable
name
Variable
value
Default
value
Conditions
Description
Error
19
Rev. 1.2.0
5. settings
Name
Variable
name
Variable
value
Default
value
Conditions
Description
for
6. timeout
Name
Variable
name
Variable
value
Default
value
Conditions
Optional
Description
Error
Text: ERROR_WRITE_FAILURE
Message:
20
Rev. 1.2.0
7. back
Name
Variable
name
Variable
value
Default
value
Conditions
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
Text: ERROR_INVALID_CALLBACK_DATA
Message:
21
Rev. 1.2.0
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.
Example:
sampleapp://action?passprnt_code=0&passprnt_message=SUCCESS
<Error List>
Text
Code
Message
SUCCESS
Printing succeeded
ERROR_INVALID_PATH
ERROR_INVALID_CALLBACK_DATA
ERROR_INVALID_DATA_LENGTH
ERROR_GETPORT_FAILURE
ERROR_DEVICE_OFFLINE_BEGINCHECKEDBLOCK
Device is offline
ERROR_WRITE_FAILURE
ERROR_DEVICE_OFFLINE_ENDCHECKEDBLOCK
Device is offline
ERROR_PORTEXCEPTION
PORTEXCEPTION occurred
ERROR_INVALID_RECEIPT_DATA
22
Rev. 1.2.0
Error Code: 0
Code
Text
SUCCESS
Message
Printing succeeded
Description
Pop-up message
Solution
Error Code: 1
Code
Text
ERROR_INVALID_PATH
Message
Description
Pop-up message
Solution
Error Code: 2
Code
Text
ERROR_INVALID_CALLBACK_DATA
Message
Description
Pop-up message
Solution
23
Rev. 1.2.0
Error Code: 3
Code
Text
ERROR_INVALID_DATA_LENGTH
Message
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
Solution
Error Code: 4
Code
Text
ERROR_GETPORT_FAILURE
Message
Description
Pop-up message
Solution
24
Rev. 1.2.0
Error Code: 5
Code
Text
ERROR_DEVICE_OFFLINE_BEGINCHECKEDBLOCK
Message
Device is offline
Description
Pop-up message
Solution
Error Code: 6
Code
Text
ERROR_WRITE_FAILURE
Message
Description
Pop-up message
25
Rev. 1.2.0
Error Code: 7
Code
Text
ERROR_DEVICE_OFFLINE_ENDCHECKEDBLOCK
Message
Device is offline
Description
Pop-up message
Error Code: 8
Code
Text
ERROR_PORTEXCEPTION
Message
PORTEXCEPTION occurred
Description
Pop-up message
PORTEXCEPTION occurred
Solution
26
Rev. 1.2.0
Error Code: 9
Code
Text
ERROR_INVALID_RECEIPT_DATA
Message
Description
Pop-up message
Solution
Set printing layout data using URL encoding to the URL scheme.
27
Rev. 1.2.0
4. Terminology
The following is a description of the words used frequently in these specifications.
Term
URL scheme
Meaning/explanation
Abbreviation
Example:
sample://path/?q=xxx
URL scheme:
Path:
Query:
Path
sample://
path/
q=xxx
Query
URL encoding
28
URL: http://www.starmicronics.com/support/