Skip to content

Commit fd3e190

Browse files
V1.1.0
1 parent 6725d48 commit fd3e190

File tree

7 files changed

+293
-47
lines changed

7 files changed

+293
-47
lines changed

CloudPRNTSDKSamples/cputil/Program.cs

Lines changed: 111 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ static void Main(string[] args)
1717
opts.JobEndCutType = CutType.Full;
1818
opts.JobEndFeedToCutter = true;
1919

20+
opts.HoldPrintControlType = HoldPrintControl.None;
21+
opts.PaperPresentStatusControlType = PaperPresentStatusControl.None;
22+
2023
for (int i = 0; i < args.Length; i++)
2124
{
2225
switch (args[i].ToLower())
@@ -70,6 +73,12 @@ static void Main(string[] args)
7073
else
7174
s = new FileStream(outputfile, FileMode.Create);
7275

76+
if (format.Equals("application/vnd.star.linematrix"))
77+
{
78+
opts.HorizontalResolution = (float)3.3334;
79+
opts.VerticalResolution = (float)3.3334;
80+
}
81+
7382
//decode(format, filename, s);
7483
Document.ConvertFile(filename, s, format, opts);
7584
s.Close();
@@ -94,6 +103,78 @@ static void Main(string[] args)
94103

95104
break;
96105

106+
case "drawer-start":
107+
opts.OpenCashDrawer = DrawerOpenTime.StartOfJob;
108+
break;
109+
110+
case "drawer-end":
111+
opts.OpenCashDrawer = DrawerOpenTime.EndOfJob;
112+
break;
113+
114+
case "drawer-none":
115+
opts.OpenCashDrawer = DrawerOpenTime.None;
116+
break;
117+
118+
case "buzzer-start":
119+
if (args.Length - i < 1)
120+
{
121+
PrintHelp();
122+
break;
123+
}
124+
125+
int buzzerStart = 0;
126+
string buzzerStart_time = args[++i];
127+
bool result_buzzerStart = int.TryParse(buzzerStart_time, out buzzerStart);
128+
129+
if (result_buzzerStart)
130+
opts.BuzzerStartPattern = buzzerStart;
131+
else
132+
Console.Error.WriteLine("Input value is incorrect. Please set correct value. e.g.) \"buzzer-start X(X is numeric)\" ");
133+
134+
break;
135+
136+
case "buzzer-end":
137+
if (args.Length - i < 1)
138+
{
139+
PrintHelp();
140+
break;
141+
}
142+
143+
int buzzerEnd = 0;
144+
string buzzerEnd_time = args[++i];
145+
bool result_buzzerEnd = int.TryParse(buzzerEnd_time, out buzzerEnd);
146+
147+
if (result_buzzerEnd)
148+
opts.BuzzerEndPattern = buzzerEnd;
149+
else
150+
Console.Error.WriteLine("Input value is incorrect. Please set correct value. e.g.) \"buzzer-end X(X is numeric)\" ");
151+
152+
break;
153+
154+
case "holdprint-default":
155+
opts.HoldPrintControlType = HoldPrintControl.Default;
156+
break;
157+
158+
case "holdprint-valid":
159+
opts.HoldPrintControlType = HoldPrintControl.Valid;
160+
break;
161+
162+
case "holdprint-invalid":
163+
opts.HoldPrintControlType = HoldPrintControl.Invalid;
164+
break;
165+
166+
case "presentstatus-default":
167+
opts.PaperPresentStatusControlType = PaperPresentStatusControl.Default;
168+
break;
169+
170+
case "presentstatus-valid":
171+
opts.PaperPresentStatusControlType = PaperPresentStatusControl.Valid;
172+
break;
173+
174+
case "presentstatus-invalid":
175+
opts.PaperPresentStatusControlType = PaperPresentStatusControl.Invalid;
176+
break;
177+
97178
case "matrix57.5":
98179
opts.DeviceWidth = 160;
99180
break;
@@ -201,8 +282,36 @@ static void PrintHelp()
201282
" the input job format does not specify a cut method.",
202283
" partialcut - request a partial cut at the end of the print job, only",
203284
" if the input job format does not specify a cut method.",
285+
" drawer-start - Request that any printer connected cash drawer is opened",
286+
" at the beginning of the print job.",
287+
" drawer-end - Request that any printer connected cash drawer is opened",
288+
" at the end of the print job.",
289+
" drawer-none - Request that any printer connected cash drawer is not",
290+
" opened when printing this job.",
291+
" buzzer-start <number of ringing> - Request that any printer connected buzzer is ringing",
292+
" by the specified number of times at the beginning of the print job.",
293+
" buzzer-end <number of ringing> - Request that any printer connected buzzer is ringing",
294+
" by the specified number of times at the end of the print job.",
295+
" holdprint-default - Request that a printer which has a presenter(taken sensor) unit is followed",
296+
" printer firmware setting about the controlling the hold print function by hardware.",
297+
" holdprint-valid - Request that a printer which has a presenter(taken sensor) unit is enabled",
298+
" about the controlling the hold print function by hardware.",
299+
" holdprint-invalid - Request that a printer which has a presenter(taken sensor) unit is disabled",
300+
" about the controlling the hold print function by hardware.",
301+
" presentstatus-default - Request that a printer which has a presenter(taken sensor) unit is followed",
302+
" printer firmware setting about the informing of hold print status.",
303+
" presentstatus-valid - Request that a printer which has a presenter(taken sensor) unit is enabled",
304+
" about the informing the hold print status.",
305+
" presentstatus-invalid - Request that a printer which has a presenter(taken sensor) unit is disabled",
306+
" about the informing the hold print status.",
204307
" waitkey - wait for a key press, use as last parameter when",
205-
" it is useful to see the output of other options.");
308+
" it is useful to see the output of other options.",
309+
"",
310+
"",
311+
"Notes:",
312+
"Only one of the drawer-start/drawer-end/drawer-none options can be used per job.",
313+
"And holdprint-default/holdprint-valid/holdprint-invalid and",
314+
"presentstatus-default/presentstatus-valid/presentstatus-invalid options are also same usage.");
206315

207316
Console.WriteLine(help);
208317
}
@@ -214,7 +323,7 @@ static void DisplayInfo()
214323
Version v = n.Version;
215324

216325
Console.WriteLine("{0}: {1}.{2}.{3}.{4}", n.Name, v.Major, v.Minor, v.Build, v.Revision);
217-
Console.WriteLine("cputil: 1.0.0.0");
326+
Console.WriteLine("cputil: 1.1.0.0");
218327
}
219328

220329
static void PrintInputs()

CloudPRNTSDKSamples/cputil/cputil.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
<TargetFramework>netcoreapp2.1</TargetFramework>
66
<Company>Star Micronics</Company>
77
<Authors>Star Micronics</Authors>
8-
<Copyright>Copyright 2019 Star Micronics Co., Ltd.</Copyright>
8+
<Copyright>Copyright 2020 Star Micronics Co., Ltd.</Copyright>
9+
<Version>1.1.0</Version>
910
</PropertyGroup>
1011

1112
<ItemGroup>
12-
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
13-
<PackageReference Include="StarMicronics.CloudPRNT-Utility" Version="1.0.0" />
13+
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
14+
<PackageReference Include="StarMicronics.CloudPRNT-Utility" Version="1.1.0" />
1415
</ItemGroup>
1516

1617
<ItemGroup>

0 commit comments

Comments
 (0)