Skip to content

Commit f49c97b

Browse files
CPUtil V2.0.0
1 parent 0c0dde3 commit f49c97b

File tree

4 files changed

+74
-33
lines changed

4 files changed

+74
-33
lines changed

CloudPRNTSDKSamples/cputil/Program.cs

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
using System;
22
using System.IO;
33
using System.Reflection;
4-
using System.Collections.Generic;
4+
using System.Diagnostics.CodeAnalysis;
55
using StarMicronics.CloudPrnt;
6+
using StarMicronics.StarDocumentMarkup;
67

78
using Newtonsoft.Json;
89

10+
911
namespace cputil
1012
{
1113
class Program
1214
{
1315
static ConversionOptions opts = new ConversionOptions();
14-
16+
17+
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(PrinterStatus))]
18+
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(PrinterStatusDetail))]
1519
static void Main(string[] args)
1620
{
1721
opts.JobEndCutType = CutType.Full;
@@ -232,6 +236,16 @@ static void Main(string[] args)
232236
opts.DeviceWidth = 832;
233237
break;
234238

239+
case "300dpi":
240+
opts.HorizontalResolution = (float)11.81;
241+
opts.VerticalResolution = (float)11.81;
242+
break;
243+
244+
case "text-magnification-1_5x":
245+
case "text-mag-1_5x":
246+
opts.BaseMagnificationType.Text = BaseMagnification.X1_5;
247+
break;
248+
235249
case "utf8":
236250
opts.SupportUTF8 = true;
237251
break;
@@ -310,6 +324,9 @@ static void PrintHelp()
310324
" matrix69.5 - set device constraints for a dot-matrix 69.5mm\" printer",
311325
" matrix3/matrix76 - set device constraints for a dot-matrix 76mm/3\" printer",
312326
" printarea <dot length> - set device constraints for a specified printable area dot size of printer",
327+
" 300dpi - set device constraints for a 300dpi printer",
328+
" text-magnification-1_5x / text-mag-1_5x",
329+
" - specify that text magnification 1.5x (for 300dpi printer)",
313330
" utf8 - specify that the target device supports UTF8 encoding (default)",
314331
" sbcs - specify that the target device supports only single byte codepages",
315332
" dither - specify that colour/greyscale images should be ditherer",
@@ -355,11 +372,17 @@ static void PrintHelp()
355372

356373
static void DisplayInfo()
357374
{
358-
Assembly a = typeof(StarMicronics.CloudPrnt.Document).Assembly;
359-
AssemblyName n = a.GetName();
360-
Version v = n.Version;
375+
Assembly asmSDMU = typeof(StarMicronics.StarDocumentMarkup.Document).Assembly;
376+
AssemblyName nameSDMU = asmSDMU.GetName();
377+
Version versionSDMU = nameSDMU.Version;
361378

362-
Console.WriteLine("{0}: {1}.{2}.{3}.{4}", n.Name, v.Major, v.Minor, v.Build, v.Revision);
379+
Console.WriteLine("{0}: {1}.{2}.{3}.{4}", nameSDMU.Name, versionSDMU.Major, versionSDMU.Minor, versionSDMU.Build, versionSDMU.Revision);
380+
381+
Assembly asmCP = typeof(StarMicronics.CloudPrnt.PrinterStatus).Assembly;
382+
AssemblyName nameCP = asmCP.GetName();
383+
Version versionCP = nameCP.Version;
384+
385+
Console.WriteLine("{0}: {1}.{2}.{3}.{4}", nameCP.Name, versionCP.Major, versionCP.Minor, versionCP.Build, versionCP.Revision);
363386

364387
AssemblyName cn = Assembly.GetExecutingAssembly().GetName();
365388
Version cv = cn.Version;
@@ -384,7 +407,7 @@ static string ConvertStatusToJson(string status)
384407
{
385408
PrinterStatus stat = new PrinterStatus(status);
386409

387-
return JsonConvert.SerializeObject(stat, Formatting.Indented);
410+
return JsonConvert.SerializeObject(stat, Formatting.Indented, new Newtonsoft.Json.Converters.StringEnumConverter());
388411
}
389412

390413
static string GetOutputMediatTypes(string filename)

CloudPRNTSDKSamples/cputil/Readme_En.txt

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
************************************************************
2-
cputil Ver 1.2.0 10/03/2025
2+
cputil Ver 2.0.0 19/05/2025
33
Readme_En.txt Star Micronics Co., Ltd.
44
************************************************************
55

@@ -16,14 +16,14 @@
1616
1. Overview
1717
=============
1818

19-
This package contains cputil Ver 1.2.0.
19+
This package contains cputil Ver 2.0.0.
2020
cputil is intented to serve and a useful back-end tool to help
2121
with implementing CloudPRNT servers that are not .NET or .NET Core based.
2222

2323
cputil can be use on any platform supported by .NET 8.0 including:
24-
- Windows x64 ... cputil-win-x64_v120.zip
25-
- Linux x64 ... cputil-linux-x64_v120.tar.gz
26-
- Apple macOS x64 /arm64 (10.15 or later) ... cputil-macos_v120.zip
24+
- Windows x64 ... cputil-win-x64_v200.zip
25+
- Linux x64 ... cputil-linux-x64_v200.tar.gz
26+
- Apple macOS x64 /arm64 (10.15 or later) ... cputil-macos_v200.zip
2727

2828
In all cases, it is possible to build a self contained package that can be
2929
run on the desired platform without the need for a .NET Framework or .NET Core
@@ -36,7 +36,7 @@
3636
2. Contents
3737
=============
3838

39-
cputil-<Platform Name>_v120.zip(or .tar.gz)
39+
cputil-<Platform Name>_v200.zip(or .tar.gz)
4040
|- Readme_En.txt // Release Notes (English)
4141
|- Readme_Jp.txt // Release Notes (Japanese)
4242
|- SoftwareLicenseAgreement.pdf // Software License Agreement (English)
@@ -50,15 +50,16 @@
5050
3. Scope
5151
==========
5252
cputil can be use on any platform supported by .NET 8.0 including:
53-
- Windows x64 ... cputil-win-x64_v120.zip
54-
- Linux x64 ... cputil-linux-x64_v120.tar.gz
55-
- Apple macOS x64 / arm64 (10.15 or later) ... cputil-macos_v120.zip
53+
- Windows x64 ... cputil-win-x64_v200.zip
54+
- Linux x64 ... cputil-linux-x64_v200.tar.gz
55+
- Apple macOS x64 / arm64 (10.15 or later) ... cputil-macos_v200.zip
5656

5757
Works with these CloudPRNT client printers:
5858
- mC-Print2
5959
- mC-Print3
60-
- mC-Label3 / TSP100IV SK
61-
- TSP100IV
60+
- mC-Label2
61+
- mC-Label3
62+
- TSP100IV / TSP100IV SK
6263
- TSP650II with IFBD-HI01X
6364
- TSP700II with IFBD-HI01X
6465
- TSP800II with IFBD-HI01X
@@ -86,7 +87,7 @@
8687
Please open the terminal or command prompt on each PC and perform following command.
8788

8889
[Windows]
89-
> cd <Extracted Directory Path>\cputil-win-x64_v120\cputil-win-x64
90+
> cd <Extracted Directory Path>\cputil-win-x64_v200\cputil-win-x64
9091

9192
[Linux]
9293
$ cd <Extracted Directory Path>/cputil-linux-x64
@@ -349,7 +350,7 @@
349350
===============
350351

351352
1. Word wrapping / column command for starmarkup features with Unicode character are only supported
352-
by mC-Print2 / mC-Print3 / mC-Label3 / TSP100IV / TSP100IV SK / TSP650II.
353+
by mC-Print2 / mC-Print3 / mC-Label2 / mC-Label3 / TSP100IV / TSP100IV SK / TSP650II.
353354

354355
=================
355356
6. OSS Licenses
@@ -370,6 +371,14 @@
370371
8. Release History
371372
====================
372373

374+
Ver 2.0.0
375+
2025/05/19:
376+
Support the following command option.
377+
- 300dpi
378+
- text-mag-1_5x
379+
Bug Fix
380+
- Fixed a problem that could cause unintended printing results when an image containing transparency information is input.
381+
373382
Ver 1.2.0
374383
2025/03/10:
375384
Support the command option of [-template] for [decode] command : for template printing function.

CloudPRNTSDKSamples/cputil/Readme_Jp.txt

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
************************************************************
2-
cputil Ver 1.2.0 2025/03/10
2+
cputil Ver 2.0.0 2025/05/19
33
Readme_Jp.txt スター精密(株)
44
************************************************************
55

@@ -16,7 +16,7 @@
1616
1. 概要
1717
==========
1818

19-
本パッケージは、cputil V1.2.0 です。
19+
本パッケージは、cputil V2.0.0 です。
2020
cputil は、.NET Frameworkまたは .NET Core ベースではない CloudPRNTサーバーの実装に役立つ
2121
便利なバックエンド ツールとして機能することを目的としています。
2222

@@ -27,9 +27,9 @@
2727
 cputilを利用するPCにて、.NET Frameworkのインストールは不要です。
2828

2929
具体的にcputilを利用できるプラットフォームは以下の通りです。
30-
- Windows x64 ... cputil-win-x64_v120.zip
31-
- Linux x64 ... cputil-linux-x64_v120.tar.gz
32-
- Apple macOS x64 /arm64 (10.15以降) ... cputil-macos_v120.zip
30+
- Windows x64 ... cputil-win-x64_v200.zip
31+
- Linux x64 ... cputil-linux-x64_v200.tar.gz
32+
- Apple macOS x64 /arm64 (10.15以降) ... cputil-macos_v200.zip
3333

3434
詳細な説明は、Star CloudPRNT プロトコルガイドを参照ください。
3535
(https://star-m.jp/products/s_print/sdk/StarCloudPRNT/manual/ja/cputil.html)
@@ -39,7 +39,7 @@
3939
2. 内容
4040
==========
4141

42-
cputil-<Platform Name>_v120.zip(or .tar.gz)
42+
cputil-<Platform Name>_v200.zip(or .tar.gz)
4343
|- Readme_En.txt // リリースノート (英語)
4444
|- Readme_Jp.txt // リリースノート (日本語)
4545
|- SoftwareLicenseAgreement.pdf // ソフトウエア使用許諾書 (英語)
@@ -55,16 +55,17 @@
5555
==========
5656

5757
本ソフトウェアは現在、.NET Core 8.0 によってサポートされるプラットフォームに対応しています。
58-
- Windows x64 ... cputil-win-x64_v120.zip
59-
- Linux x64 ... cputil-linux-x64_v120.tar.gz
60-
- Apple macOS x64 /arm64 (10.15以降) ... cputil-macos_v120.zip
58+
- Windows x64 ... cputil-win-x64_v200.zip
59+
- Linux x64 ... cputil-linux-x64_v200.tar.gz
60+
- Apple macOS x64 /arm64 (10.15以降) ... cputil-macos_v200.zip
6161

6262
いずれの場合も、自己完結型パッケージにてビルドされており、
6363
.NET Framework または .NET Core のインストールを必要とせずに目的のプラットフォームで実行できます。
6464

6565
また、下記のCloudPRNTクライアント対応プリンタを対象としています。:
6666
- mC-Print2
6767
- mC-Print3
68+
- mC-Label2
6869
- mC-Label3
6970
- TSP100IV / TSP100IV SK
7071

@@ -81,7 +82,7 @@
8182
(https://star-m.jp/products/s_print/sdk/StarCloudPRNT/manual/ja/cputil.html)
8283

8384
### インストレーション
84-
PC 上の任意のパスに cputil-<プラットフォーム名>_v120.zip(または .tar.gz)を解凍してください。
85+
PC 上の任意のパスに cputil-<プラットフォーム名>_v200.zip(または .tar.gz)を解凍してください。
8586
(インストール場所と方法は、PC/サーバー管理者が任意で選択できます)
8687

8788
以下の操作は、本使用例をテストするために実施します。
@@ -90,7 +91,7 @@
9091
また起動後、次のコマンドを実行してください。
9192

9293
[Windows]
93-
> cd <Extracted Directory Path>\cputil-win-x64_v120\cputil-win-x64
94+
> cd <Extracted Directory Path>\cputil-win-x64_v200\cputil-win-x64
9495

9596
[Linux]
9697
$ cd <Extracted Directory Path>/cputil-linux-x64
@@ -335,6 +336,14 @@
335336
8. 変更履歴
336337
=============
337338

339+
Ver 2.0.0
340+
2025/05/19:
341+
以下のコマンドオプションを追加
342+
- 300dpi
343+
- text-mag-1_5x
344+
不具合修正
345+
- 透過情報を含む画像を入力したとき、意図しない印字結果になることがある問題を修正
346+
338347
Ver 1.2.0
339348
2025/03/10:
340349
「decode」コマンド : 「-template」コマンドオプションによりテンプレート印刷機能をサポート

CloudPRNTSDKSamples/cputil/cputil.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<Company>Star Micronics</Company>
77
<Authors>Star Micronics</Authors>
88
<Copyright>Copyright 2020 Star Micronics Co., Ltd.</Copyright>
9-
<Version>1.2.0</Version>
9+
<Version>2.0.0</Version>
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="StarMicronics.CloudPRNT-Utility" Version="1.2.0" />
13+
<PackageReference Include="StarMicronics.CloudPRNT-Utility" Version="2.0.0" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

0 commit comments

Comments
 (0)