@@ -17,6 +17,9 @@ static void Main(string[] args)
17
17
opts . JobEndCutType = CutType . Full ;
18
18
opts . JobEndFeedToCutter = true ;
19
19
20
+ opts . HoldPrintControlType = HoldPrintControl . None ;
21
+ opts . PaperPresentStatusControlType = PaperPresentStatusControl . None ;
22
+
20
23
for ( int i = 0 ; i < args . Length ; i ++ )
21
24
{
22
25
switch ( args [ i ] . ToLower ( ) )
@@ -70,6 +73,12 @@ static void Main(string[] args)
70
73
else
71
74
s = new FileStream ( outputfile , FileMode . Create ) ;
72
75
76
+ if ( format . Equals ( "application/vnd.star.linematrix" ) )
77
+ {
78
+ opts . HorizontalResolution = ( float ) 3.3334 ;
79
+ opts . VerticalResolution = ( float ) 3.3334 ;
80
+ }
81
+
73
82
//decode(format, filename, s);
74
83
Document . ConvertFile ( filename , s , format , opts ) ;
75
84
s . Close ( ) ;
@@ -94,6 +103,78 @@ static void Main(string[] args)
94
103
95
104
break ;
96
105
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
+
97
178
case "matrix57.5" :
98
179
opts . DeviceWidth = 160 ;
99
180
break ;
@@ -201,8 +282,36 @@ static void PrintHelp()
201
282
" the input job format does not specify a cut method." ,
202
283
" partialcut - request a partial cut at the end of the print job, only" ,
203
284
" 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." ,
204
307
" 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." ) ;
206
315
207
316
Console . WriteLine ( help ) ;
208
317
}
@@ -214,7 +323,7 @@ static void DisplayInfo()
214
323
Version v = n . Version ;
215
324
216
325
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" ) ;
218
327
}
219
328
220
329
static void PrintInputs ( )
0 commit comments