Skip to content

Commit 37c5d25

Browse files
0.1.2
1 parent f75243f commit 37c5d25

File tree

383 files changed

+11743
-2036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

383 files changed

+11743
-2036
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
- [日本語](Documents/CHANGELOG_JP.md)
22

33
# Change Log
4+
5+
## 0.1.2(2026/01/21)
6+
7+
* Added StarPrinterFactory class
8+
* Supported Windows
9+
* Bug fixes
10+
11+
## 0.1.1(2025/12/04)
12+
13+
* Replaced license file
414

515
## 0.1.0(2025/11/28)
616

7-
Beta version release
17+
* Beta version release

Documents/CHANGELOG_JP.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
- [English](../CHANGELOG.md)
22

33
# 変更点
4+
5+
## 0.1.2(2026/01/21)
6+
7+
* StarPrinterFactoryクラス追加
8+
* Windows対応
9+
* バグ修正
10+
11+
## 0.1.1(2025/12/04)
12+
13+
* ライセンスファイル差し替え
414

515
## 0.1.0(2025/11/28)
616

7-
ベータ版初版リリース
17+
* ベータ版初版リリース

Documents/Manual.md

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# StarXpand SDK for Web Developer's manual V0.1.0
1+
# StarXpand SDK for Web Developer's manual V0.1.2
22

33
## Overview
44

@@ -8,12 +8,13 @@ StarXpand SDK for Web is a software development kit that includes sample codes a
88

99
| OS | Browser |
1010
| -------- | -------- |
11+
| Windows | Chrome |
12+
| Windows | Edge |
1113
| macOS | Chrome |
1214
| ChromeOS | Chrome |
1315
| Ubuntu | Chrome |
1416
| Android | Chrome |
15-
16-
Windows OS will be supported at V1.0.0.
17+
1718
Firefox, Safari are not supported because they do not support WebUSB API as of November, 2025.
1819

1920
### Language
@@ -33,12 +34,42 @@ Firefox, Safari are not supported because they do not support WebUSB API as of N
3334
- mPOP series
3435
- TSP100IV series
3536
- TSP100IV-SK series
36-
37+
38+
## About replacing USB drivers
39+
In Windows and Ubuntu, it is necessary to replace the USB driver by following the procedure below.
40+
41+
## In Windows
42+
1. Turn on the printer and connect the printer and the host terminal with a USB cable.
43+
44+
The USB port that can communicate with the device varies depending on the printer.
45+
Please check the online manual or hardware manual of the printer you are using.
46+
47+
2. Replace the printer driver.  
48+
Run `example/scripts_for_client/Windows/install.bat` with administrator privileges.
49+
When you execute the driver replacement, USB printers cannot be used from other software.
50+
When using the printer with other software, please restore the driver by following the procedure below.
51+
52+
1. Open Device Manager
53+
2. Right-click the corresponding printer from "Universal Serial Bus Devices" and select "Update driver"
54+
3. Select "Browse my computer for drivers"
55+
4. Select "Let me pick from a list of available drivers on my computer"
56+
5. Select "USB Printing Support" and click "Next"
57+
58+
## In Ubuntu
59+
Just before using the printer, run the following script with administrator privileges:
60+
`example/scripts_for_client/linux/onetime.sh`
61+
62+
When you execute the script, the previously installed printer driver will become unusable.
63+
The effect of the script will be reverted by performing the following operations. When using the previously installed printer driver, please perform the following operations.
64+
- Unplug and replug the printer's USB cable
65+
- Restart the printer
66+
- Restart ubuntu
67+
3768
## Functions
3869

3970
### StarXpandCommandBuilder
4071

41-
Provides the same functionality as [the react-native version](https://star-m.jp/products/s_print/sdk/react-native-star-io10/manual/en/api-reference/star-xpand-command/index.html). However, [the way to specify image sources](https://star-m.jp/products/s_print/sdk/react-native-star-io10/manual/en/api-reference/star-xpand-command/printer/image-parameter/constructor.html#star-xpand-command-printer-image-parameter-constructor) differs:
72+
Provides the same functionality as [the react-native version](https://star-m.jp/products/s_print/sdk/react-native-star-io10/manual/en/api-reference/star-xpand-command/index.html). However, [the way to specify image sources](https://star-m.jp/products/s_print/sdk/react-native-star-io10/manual/en/api-reference/star-xpand-command/printer/image-parameter/constructor.html) differs:
4273

4374
- Image source specification
4475
- Base64-encoded content
@@ -70,6 +101,8 @@ Delegate notified when a printer is discovered
70101
#### Methods
71102

72103
- `constructor(connectionSettings: StarConnectionSettings)`
104+
It may take time until printing is possible.
105+
Using the StarPrinterFactory class can perform part of the initialization process in advance.
73106

74107
- `async open(options: OpenOptions = new OpenOptions()): Promise<void>`
75108

@@ -82,6 +115,15 @@ Delegate notified when a printer is discovered
82115
- `async getStatus(options: GetStatusOptions = new GetStatusOptions(),): Promise<StarPrinterStatus>`
83116

84117
- `async getInformation(options: GetInformationOptions = new GetInformationOptions()): Promise<StarPrinterInformation>`
118+
119+
### StarPrinterFactory class
120+
121+
#### Methods
122+
- `constructor()`
123+
124+
- `createStarPrinter(connectionSettings: StarConnectionSettings): StarPrinter`
125+
Using the constructor of the StarPrinter class may take time until printing is possible.
126+
This method can shorten the time until printing is possible.
85127

86128
### Options.OpenOptions class
87129

@@ -137,14 +179,6 @@ Delegate notified when a printer is discovered
137179
- `emulation: StarPrinterEmulation`
138180
- `detail: StarPrinterInformationDetail`
139181

140-
#### Methods
141-
142-
- `serialize(): string`
143-
Get a JSON-formatted string containing printer information
144-
145-
- `static deserialize(jsonString: string): StarPrinterInformation`
146-
Create a StarPrinterInformation object from a JSON string
147-
148182
### StarPrinterStatus class
149183

150184
#### Properties
@@ -155,15 +189,7 @@ Delegate notified when a printer is discovered
155189
- `paperEmpty: boolean`
156190
- `paperNearEmpty: boolean`
157191
- `detail: StarPrinterStatusDetail`
158-
159-
#### Methods
160-
161-
- `serialize(): string`
162-
Get a JSON-formatted string containing printer status
163-
164-
- `static deserialize(jsonString: string): StarPrinterStatus`
165-
Create a StarPrinterStatus object from a JSON string
166-
192+
167193
### StarIO10Logger class
168194

169195
Output logs to the console

Documents/Manual_JP.md

Lines changed: 59 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# StarXpand SDK for web マニュアル V0.1.0
1+
# StarXpand SDK for web マニュアル V0.1.2
22

33
## 概要
44

@@ -8,12 +8,13 @@
88

99
| OS | ブラウザ |
1010
| -------- | -------- |
11+
| Windows | Chrome |
12+
| Windows | Edge |
1113
| macOS | Chrome |
1214
| ChromeOS | Chrome |
1315
| Ubuntu | Chrome |
1416
| Android | Chrome |
15-
16-
Windowsは、V1.0.0で対応予定です
17+
1718
Firefox、Safariは、2025年11月現在、WebUSB APIをサポートしていないため、非対応です
1819

1920
### 言語
@@ -33,13 +34,53 @@ Firefox、Safariは、2025年11月現在、WebUSB APIをサポートしていな
3334
- mPOP
3435
- TSP100IV
3536
- TSP100IV-SK
36-
37+
38+
## USBドライバの差し替えについて
39+
40+
WindowsおよびUbuntuでは、以下の手順でUSBドライバを差し替える必要があります。
41+
42+
## Windowsの場合
43+
44+
1. プリンターの電源を入れ、プリンターと上位端末をUSBケーブルで接続します。
45+
46+
デバイスと通信可能なUSBポートはプリンターによって異なります。
47+
ご利用いただくプリンターのオンラインマニュアルまたはハードウェアマニュアルにてご確認ください。
48+
49+
2. プリンターのドライバを差し替えます。  
50+
`example/scripts_for_client/Windows/install.bat` を、管理者権限で実行してください
51+
52+
ドライバの差し替えを実行すると、他のソフトウェアからはUSBプリンターを使用できなくなります。
53+
プリンターを他のソフトウェアで使用する際は、以下の手順でドライバーを元に戻してください。
54+
55+
1. デバイスマネージャーを開く
56+
2. 「ユニバーサル シリアル バス デバイス」から該当のプリンターを右クリックし、「ドライバーの更新」を選択する
57+
3. 「コンピューターを参照してドライバーを検索」を選択する
58+
4. 「コンピューター上の利用可能なドライバーの一覧から選択します」を選択する
59+
5. 「USB 印刷サポート」を選択し、「次へ」をクリックする
60+
61+
### Ubuntuの場合
62+
63+
1. プリンターの電源を入れ、プリンターと上位端末をUSBケーブルで接続します。
64+
65+
デバイスと通信可能なUSBポートはプリンターによって異なります。
66+
ご利用いただくプリンターのオンラインマニュアルまたはハードウェアマニュアルにてご確認ください。
67+
68+
2. プリンターのドライバを差し替えます。
69+
`example/scripts_for_client/linux/onetime.sh` を、管理者権限で実行してください
70+
71+
プリンタードライバを差し替えると、従来のプリンタードライバは使用できなくなります。
72+
以下の操作を行うと、スクリプトの効果は元に戻ります。従来のプリンタードライバを使用する際は、以下の操作を実行して下さい。
73+
74+
- プリンターのUSBケーブルを抜き差しする
75+
- プリンターを再起動する
76+
- Ubuntuを再起動する
77+
3778
## 機能
3879

3980
### StarXpandCommandBuilder
4081

4182
[react-native版](https://star-m.jp/products/s_print/sdk/react-native-star-io10/manual/ja/api-reference/star-xpand-command/index.html)と同様の機能を提供します
42-
ただし、[画像ソースの指定方法](https://star-m.jp/products/s_print/sdk/react-native-star-io10/manual/ja/api-reference/star-xpand-command/printer/image-parameter/constructor.html#star-xpand-command-printer-image-parameter-constructor)が異なります
83+
ただし、[画像ソースの指定方法](https://star-m.jp/products/s_print/sdk/react-native-star-io10/manual/ja/api-reference/star-xpand-command/printer/image-parameter/constructor.html)が異なります
4384

4485
- 画像ソースの指定方法
4586
- Base64エンコードされたコンテンツ
@@ -72,6 +113,8 @@ Firefox、Safariは、2025年11月現在、WebUSB APIをサポートしていな
72113
#### メソッド
73114

74115
- `constructor(connectionSettings: StarConnectionSettings)`
116+
  印字可能になるまで、時間がかかる場合があります。
117+
  StarPrinterFactoryクラスを使用すると、初期化処理の一部を事前に実行できます。
75118

76119
- `async open(options: OpenOptions = new OpenOptions()): Promise<void>`
77120

@@ -84,6 +127,16 @@ Firefox、Safariは、2025年11月現在、WebUSB APIをサポートしていな
84127
- `async getStatus(options: GetStatusOptions = new GetStatusOptions(),): Promise<StarPrinterStatus>`
85128

86129
- `async getInformation(options: GetInformationOptions = new GetInformationOptions()): Promise<StarPrinterInformation>`
130+
131+
### StarPrinterFactoryクラス
132+
133+
#### メソッド
134+
135+
- `constructor()`
136+
137+
- `createStarPrinter(connectionSettings: StarConnectionSettings): StarPrinter`
138+
StarPrinterクラスのコンストラクタを使用すると、印字可能になるまで時間がかかる場合があります。
139+
本メソッドを使用すると、印字可能になるまでの時間を短縮できます。
87140

88141
### Options.OpenOptionsクラス
89142

@@ -137,15 +190,7 @@ Firefox、Safariは、2025年11月現在、WebUSB APIをサポートしていな
137190

138191
- `model: StarPrinterModel`
139192
- `emulation: StarPrinterEmulation`
140-
- `detail: StarPrinterInformationDetail`
141-
142-
#### メソッド
143-
144-
- `serialize():string`
145-
プリンター情報を格納した、JSON形式の文字列を取得する
146-
147-
- `static deserialize(jsonString:string):StarPrinterInformation`
148-
JSON形式の文字列から、StarPrinterInformationオブジェクトを生成する
193+
- `detail: StarPrinterInformationDetail`
149194

150195
### StarPrinterStatusクラス
151196

@@ -158,14 +203,6 @@ Firefox、Safariは、2025年11月現在、WebUSB APIをサポートしていな
158203
- `paperNearEmpty: boolean`
159204
- `detail: StarPrinterStatusDetail`
160205

161-
#### メソッド
162-
163-
- `serialize():string`
164-
プリンターステータスを格納した、JSON形式の文字列を取得する
165-
166-
- `static deserialize(jsonString:string):StarPrinterStatus`
167-
JSON形式の文字列から、StarPrinterStatusオブジェクトを生成する
168-
169206
### StarIO10Loggerクラス
170207

171208
コンソールにログを出力する

Documents/README_JP.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,20 @@ StarXpand SDKのドキュメントは[こちら](Manual_JP.md)を参照くださ
3232
## 動作環境
3333

3434

35-
| OS | ブラウザ |
36-
| -------- | -------- |
37-
| macOS | Chrome |
38-
| ChromeOS | Chrome |
39-
| Ubuntu | Chrome |
40-
| Android | Chrome |
41-
42-
Windowsは、V1.0.0で対応予定です
43-
Firefox、Safariは、2025年11月現在、WebUSB APIをサポートしていないため、非対応です
35+
| OS | ブラウザ |
36+
| -------- | -------- |
37+
| Windows | Chrome |
38+
| Windows | Edge |
39+
| macOS | Chrome |
40+
| ChromeOS | Chrome |
41+
| Ubuntu | Chrome |
42+
| Android | Chrome |
43+
4444
<a id="TestEnvironment"></a>SDK同梱のサンプルアプリをビルドして動作することを確認しています
4545

46+
Firefox、Safariは、2025年11月現在、WebUSB APIをサポートしていないため、非対応です
47+
48+
4649
## 導入
4750

4851
```
@@ -68,9 +71,14 @@ StarXpand SDKにはプリンターと組み合わせて動作を確認できる[
6871
```bash
6972
npm start
7073
```
71-
4. ブラウザで http://localhost:3000 にアクセスする
74+
75+
4. USBドライバの事前準備
76+
77+
[マニュアル](Manual_JP.md#usbドライバの差し替えについて)を参照し、USBドライバの差し替えを実施してください
78+
79+
5. ブラウザで http://localhost:3000 にアクセスする
7280

73-
5. 検索
81+
6. 検索
7482

7583
1. ブラウザ画面上の`Discovery`ボタンを押下し、 http://localhost/discovery:3000 にアクセスする
7684

@@ -102,7 +110,7 @@ StarXpand SDKにはプリンターと組み合わせて動作を確認できる[
102110

103111
7. `StarXpand SDK for Web`を押下し、 http://localhost:3000 に戻る
104112

105-
6. 印刷
113+
7. 印刷
106114

107115
1. `Printing`ボタンを押下し、 http://localhost/printing:3000 にアクセスする
108116

LICENSE

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ You should be aware that we may change this Agreement at any time. In the event
8484

8585

8686

87-
Terms and Conditions for Developers (Addendum to the General Terms and Conditions)
87+
.Terms and Conditions for Developers (Addendum to the General Terms and Conditions)
8888

8989
If you are Star Development partner and the Software contains STAR’s software developer’s tool kit (hereinafter referred to as “SDK“) or API, your use of the SDK and API is governed by the terms of this “Terms and Conditions for Developers” in addition to the I.General Terms and Conditions. In the event of any conflict between the terms of the I.General Terms and Conditions and this Terms and Conditions for Developers, the terms of this Terms and Conditions for Developers shall govern. You should carefully read the following terms and conditions before using the SDK and API provided by STAR.
9090
The following teams Shall have the following meanings:
9191
The “SDK” is defined as the downloadable package of libraries, applications, and documentation that you may use solely in connection with development and testing of your software application(hereinafter referred to as “Application”) to enable it to communicate with a Star Product or device, as provided herein (hereinafter referred to as the “Permitted Use”).
9292
The “API” is defined as the Application Programing interface information, specifications and documentation provided as a download for your Permitted Use.
9393

9494
1. LICENSE
95-
Star grants you a limited, non-exclusive, non-transferable license to use the SDK and API, including the human readable code of the SDK (hereinafter referred to as “Source Code”), subject to the terms and restrictions set forth in I.General Terms and Conditionsthis and Terms and Conditions for Developers.
95+
Star grants you a limited, non-exclusive, non-transferable license to use the SDK and API, including the human readable code of the SDK (hereinafter referred to as “Source Code”), subject to the terms and restrictions set forth in I.General Terms and Conditions and this Terms and Conditions for Developers.
9696

9797
2.Use of Source Code
9898
The SDK is licensed to be used on any personal computer or networked machines, provided that the SDK is used only in connection with the Permitted Use. You may use the Source Code internally to engage in the Permitted Use and you may use, modify or merge all or portions of the Source Code with your Application and distribute it only as part of your Application in object code form only.
@@ -105,23 +105,12 @@ Privacy Policy for SDK: https://www.star-m.jp/prjump/000193.html
105105
To read our latest Software License Agreement, please visit the following URL.
106106
https://www.star-m.jp/wp-content/uploads/SoftwareLicenseAgreement_web.pdf
107107

108-
Copyright (c) 2013-2021 Niels Lohmann
109-
Released under the MIT license
110-
https://opensource.org/licenses/mit-license.php
111108

112-
Copyright (c) .NET Foundation and Contributors
109+
Copyright (c) Meta Platforms, Inc. and affiliates.
113110
Released under the MIT license
114111
https://opensource.org/licenses/mit-license.php
115112

116-
Copyright (c) 2015-present, Facebook, Inc.
117-
Released under the MIT license
118-
https://opensource.org/licenses/mit-license.php
119-
120-
Copyright (c) 2022 Iddan Aaronsohn
121-
Released under the MIT license
122-
https://opensource.org/licenses/mit-license.php
123113

124-
Copyright (c) 2015 Kyle Corbitt
125-
Copyright (c) 2020 Sayem Chowdhury
114+
Copyright (c) 2013-2022 Niels Lohmann
126115
Released under the MIT license
127116
https://opensource.org/licenses/mit-license.php

0 commit comments

Comments
 (0)