seven365-zyprinter 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/Package.swift +43 -0
  2. package/README.md +186 -0
  3. package/Seven365Zyprinter.podspec +27 -0
  4. package/android/build.gradle +58 -0
  5. package/android/src/main/AndroidManifest.xml +2 -0
  6. package/android/src/main/java/com/mycompany/plugins/example/Example.java +342 -0
  7. package/android/src/main/java/com/mycompany/plugins/example/ExamplePlugin.java +161 -0
  8. package/android/src/main/res/.gitkeep +0 -0
  9. package/dist/docs.json +229 -0
  10. package/dist/esm/definitions.d.ts +56 -0
  11. package/dist/esm/definitions.js +2 -0
  12. package/dist/esm/definitions.js.map +1 -0
  13. package/dist/esm/index.d.ts +4 -0
  14. package/dist/esm/index.js +7 -0
  15. package/dist/esm/index.js.map +1 -0
  16. package/dist/esm/web.d.ts +49 -0
  17. package/dist/esm/web.js +40 -0
  18. package/dist/esm/web.js.map +1 -0
  19. package/dist/plugin.cjs.js +54 -0
  20. package/dist/plugin.cjs.js.map +1 -0
  21. package/dist/plugin.js +57 -0
  22. package/dist/plugin.js.map +1 -0
  23. package/ios/Seven365Zyprinter.podspec +28 -0
  24. package/ios/Sources/Plugin/ZyprintPlugin.swift +161 -0
  25. package/ios/Sources/Plugin/ZywellSDK.swift +358 -0
  26. package/ios/Sources/Seven365Zyprinter-Umbrella.h +16 -0
  27. package/ios/Sources/module.modulemap +12 -0
  28. package/ios/Sources/sources/BLEManager.h +658 -0
  29. package/ios/Sources/sources/BLEManager.m +2842 -0
  30. package/ios/Sources/sources/GCD/Documentation.html +47 -0
  31. package/ios/Sources/sources/GCD/GCDAsyncSocket.h +1226 -0
  32. package/ios/Sources/sources/GCD/GCDAsyncSocket.m +8560 -0
  33. package/ios/Sources/sources/GCD/GCDAsyncUdpSocket.h +1036 -0
  34. package/ios/Sources/sources/GCD/GCDAsyncUdpSocket.m +5632 -0
  35. package/ios/Sources/sources/GCD/PrinterManager.h +91 -0
  36. package/ios/Sources/sources/GCD/PrinterManager.m +513 -0
  37. package/ios/Sources/sources/GCD/WifiManager.h +91 -0
  38. package/ios/Sources/sources/GCD/WifiManager.m +510 -0
  39. package/ios/Sources/sources/ImageTranster.h +38 -0
  40. package/ios/Sources/sources/ImageTranster.m +389 -0
  41. package/ios/Sources/sources/POSBLEManager.h +759 -0
  42. package/ios/Sources/sources/POSBLEManager.m +834 -0
  43. package/ios/Sources/sources/POSSDK.h +93 -0
  44. package/ios/Sources/sources/POSWIFIManager.h +116 -0
  45. package/ios/Sources/sources/POSWIFIManager.m +260 -0
  46. package/ios/Sources/sources/POSWIFIManagerAsync.h +745 -0
  47. package/ios/Sources/sources/POSWIFIManagerAsync.m +1847 -0
  48. package/ios/Sources/sources/PosCommand.h +633 -0
  49. package/ios/Sources/sources/PosCommand.m +1019 -0
  50. package/ios/Sources/sources/TscCommand.h +723 -0
  51. package/ios/Sources/sources/TscCommand.m +566 -0
  52. package/ios/Tests/ExamplePluginTests/ExamplePluginTests.swift +15 -0
  53. package/package.json +339 -0
@@ -0,0 +1,723 @@
1
+ //
2
+ // TscCommand.h
3
+ // Printer
4
+ //
5
+ // Created by LeeLee on 16/7/19.
6
+ // Copyright © 2016年 Admin. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "UIKit/UIKit.h"
11
+ #import "ImageTranster.h"
12
+ ///TSC指令类,调用其类方法可返回Nsdata类型的数据,用于发送,此类只适用于TSC打印机
13
+ @interface TscCommand : NSObject
14
+
15
+ /**
16
+ this command defines the label width and lenth
17
+ 设定标签纸的宽度及长度
18
+ SIZE m mm,n mm
19
+ 单位 mm
20
+ @param m label width
21
+ @param n label length
22
+ @discussion
23
+ */
24
+ +(NSData *) sizeBymmWithWidth:(double) m andHeight:(double) n;
25
+
26
+ /**
27
+ this command defines the label width and lenth
28
+ 设定标签纸的宽度及长度
29
+ SIZE m ,n
30
+ 单位 inch
31
+ @param m label width
32
+ @param n label length
33
+ */
34
+ +(NSData *) sizeByinchWithWidth:(double) m andHeight:(double) n;
35
+
36
+ /**
37
+ this command defines the label width and lenth
38
+ 设定标签纸的宽度及高度
39
+ SIZE m ,n
40
+ 单位 dot
41
+ @param m label width
42
+ @param n label length
43
+ */
44
+ +(NSData *) sizeBydotWithWidth:(int) m andHeight:(int) n;
45
+
46
+ /**
47
+ this command defines the gap distance between to labels
48
+ 设置标签纸的垂直间距
49
+ GAP m mm,n mm
50
+ 单位 mm
51
+ @param m the gap distance between two labels
52
+ @param n the offset distance of the gap
53
+ */
54
+ +(NSData *) gapBymmWithWidth:(double) m andHeight:(double) n;
55
+
56
+
57
+ /**
58
+
59
+ this command defines the gap distance between to labels
60
+ 设置标签纸的间距
61
+ GAP m,n
62
+ 单位 inch
63
+ @param m the gap distance between two labels
64
+ @param n the offset distance of the gap
65
+ */
66
+ +(NSData *) gapByinchWithWidth:(double) m andHeight:(double) n;
67
+
68
+ /**
69
+ this command defines the gap distance between to labels
70
+ 设置标签纸的间距
71
+ GAP m,n
72
+ 单位 dot
73
+ @param m the gap distance between two labels
74
+ @param n the offset distance of the gap
75
+ */
76
+ +(NSData *) gapBydotWithWidth:(int) m andHeight:(int) n;
77
+
78
+ /**
79
+ this command feeds the paper throught the gap sensor in an effort to determine the paper and gap sizes,respectively.
80
+
81
+ GAPDETECT x,y
82
+ 单位 (dot)
83
+ @param x paper length(in dots)
84
+ @param y gap length(in dots)
85
+ */
86
+ +(NSData *) gapDetectWithX:(int) x andY:(int) y;
87
+ /**
88
+ this command feeds the paper through the gap sensor in an effort to determine the paper and gap sizes,respectively.
89
+
90
+ GAPDETECT
91
+
92
+ ( */
93
+
94
+ +(NSData *) gapDetect;
95
+
96
+ /**
97
+ this command feeds the paper through the black mark sensor in an effort to the determine the paper and black mark size.
98
+ BLINEDDETECT X,Y
99
+ @param x paper lenght(in dots)
100
+ @param y gap lenght(in dots)
101
+ */
102
+ +(NSData *) blinedDetectWithX:(int) x andY:(int) y;
103
+
104
+ /**
105
+ this command feeds the paper through the gap/black mark sensor in an effort to deternine the paper and gap/black mark size.
106
+ AUTODETECT X,Y
107
+ @param x paper length(in dots)
108
+ @param y gap length(in dots)
109
+ */
110
+ +(NSData *) autoDetectWithX:(int) x andY:(int) y;
111
+
112
+ /**
113
+ this command sets the height of the black line and the user-defined extra label feeding length each from feed takes.
114
+ 设定黑标的高度及偏移位置
115
+ BLINE M,N
116
+ 单位 inch
117
+ @param m the height of black line in mm
118
+ @param n the extra label feeding length
119
+ */
120
+ +(NSData *) blineByinchWithM:(double) m andN:(double) n;
121
+
122
+ /**
123
+ this command sets the height of the black line and the user-defined extra label feeding length each from feed takes.
124
+ 设定黑标的高度及偏移位置
125
+ BLINE M,N
126
+ 单位 inch
127
+ @param m the height of black line in inch
128
+ @param n the extra label feeding length
129
+ */
130
+ +(NSData *) blineBymmWithM:(double) m andN:(double) n;
131
+
132
+ /**
133
+ this command sets the height of the black line and the user-defined extra label feeding length each from feed takes.
134
+ 设定黑标的高度及偏移位置
135
+ BLINE M,N
136
+ @param m the height of black line either in dot
137
+ @param n the extra label feeding length
138
+ */
139
+ +(NSData *) blineBydotWithM:(int) m andN:(int) n;
140
+
141
+ /**
142
+ this command sets the position of label under the pee-off mode.
143
+ OFFSET m
144
+ 剥离模式下,控制每张标签停止的位置
145
+ 单位 inch
146
+ @param m the offset distance(in inch)
147
+ */
148
+ +(NSData *) offSetByinchWithM:(double) m;
149
+
150
+ /**
151
+ this command sets the position of label under the pee-off mode.
152
+ OFFSET m mm
153
+ 剥离模式下,控制每张标签停止的位置
154
+ 单位 mm
155
+ @param m the offset distance(in mm)
156
+ */
157
+ +(NSData *) offSetBymmWithM:(double) m;
158
+
159
+ /**
160
+ this command sets the position of label under the pee-off mode.
161
+ OFFSET m mm
162
+ 剥离模式下,控制每张标签停止的位置
163
+ 单位 dot
164
+ @param m the offset distance(in dots)
165
+ */
166
+ +(NSData *) offSetBydotWithM:(int) m;
167
+
168
+ /**
169
+ this command defines the print speed
170
+ SPEED N
171
+ 设置走纸速度
172
+ @param n printing speed in inch per second
173
+ */
174
+
175
+ +(NSData *) speed:(double) n;
176
+
177
+ /**
178
+ this command sets the printing daekesss
179
+ DENSITY n
180
+ @param n specifiles the lightest/darkest level
181
+ */
182
+
183
+ +(NSData *) density:(int) n;
184
+
185
+ /**
186
+ this command defines the printout direction and mirror image.this will be stored in the printermemory.
187
+ 定义打印时出纸方向
188
+ DIRECTION n
189
+ @param n 0 or 1,please refer to the illustrations below.
190
+ */
191
+
192
+ +(NSData *) direction:(int) n;
193
+
194
+ /**
195
+ this command defines the reference point the of the label.the referce (origin) point varies with the print direction,as shown.
196
+ 用于定义标签的参考坐标原点
197
+ REFERENCE x,y
198
+ @param x Horizontal coordinate(in dots).
199
+ @param y Vertical coordinate (in dots).
200
+ */
201
+ +(NSData *) referenceWithX:(int) x andY:(int) y;
202
+
203
+ /**
204
+ this command moves the label's vertical position.
205
+ SHIFT n
206
+ @param n the maximum calue is 1 inch.for 200 dpi printers,this range is -203 to 203;for 300 dpi printers,the range is -300 to 300.this unit is dot.
207
+ */
208
+
209
+ +(NSData *) shift:(int) n;
210
+
211
+ ///this command orients the keyboard for use in different countries via defining special characters on the KP-200 series portable LCD keyboard (option).
212
+ ///用于选择国际字符集
213
+ /// @param countryCoding the keyboard for use in different countries via defining special characters
214
+ +(NSData *) country:(NSString *) countryCoding;
215
+
216
+ /**
217
+ this command orients the keyboard for use in different countries via defining special characters on the KP-200 series portable LCD keyboard (option).
218
+ 指定字符编码
219
+ CODEPAE n
220
+ @param str the name of codepage;
221
+ */
222
+
223
+ +(NSData *) codePage:(NSString *) str;
224
+
225
+ /**
226
+ this command clears the iamge buffer.
227
+ 清除缓存
228
+ CLS
229
+
230
+ */
231
+
232
+ +(NSData *) cls;
233
+
234
+ /**
235
+ this command feeds label with the specified length. the length is specified by dot.
236
+ 控制进纸距离,单位dot
237
+ FEED n
238
+ @param n the length label feeds.
239
+ */
240
+
241
+ +(NSData *) feed:(int) n;
242
+
243
+ /**
244
+ this command feeds the label in reverse.the length is specified by dot.
245
+ BACKFEED n
246
+ n的单位 dot
247
+ @param n the length babel feeds in reverse.
248
+ */
249
+
250
+ +(NSData *) backFeed:(int) n;
251
+
252
+ /**
253
+ this command feeds label to the beginning of next label.
254
+ FORMFEED
255
+
256
+ */
257
+
258
+ +(NSData *) formFeed;
259
+
260
+ /**
261
+
262
+ this command will feed label until the sensor has determined origin.
263
+ HOME
264
+
265
+ */
266
+
267
+ +(NSData *) home;
268
+
269
+ /**
270
+ this command prints the label format currently stored in the image buffer.
271
+ PRINT M,N
272
+ @param m specifies how many sets of labels will be printed
273
+ @param n specifies how many copies should be printed for each particular label set.
274
+ */
275
+ +(NSData *) printWithM:(int) m andN:(int) n;
276
+
277
+ /**
278
+ this command prints the label format currently stored in the image buffer.
279
+ PRINT m
280
+ @param m specifies how many sets of labels will be printed
281
+ */
282
+
283
+ +(NSData *) print:(int) m;
284
+
285
+ /**
286
+ this command controls the sound frequency of the beeper .there are 10 levels of sounds
287
+ SOUND level,interval
288
+ @param level sound level:0-9.
289
+ @param interval sound interval:1-4095.
290
+ */
291
+ +(NSData *) soundWithLevel:(int) level andInterval:(int) interval;
292
+
293
+ /**
294
+ this command activates the cutter to immediately cut the labels without back feeding the label.
295
+ 切纸
296
+ CUT
297
+
298
+ */
299
+
300
+ +(NSData *) cut;
301
+
302
+ /**
303
+ this command use to stop feeding paper while feed paper wrong.
304
+ 用于设定打印机进纸时,无法检测到垂直间距,发送错误,停止进纸
305
+ LIMITFEED n
306
+ 单位 inch
307
+ @param n the limit length of wrong(in inch).
308
+ */
309
+
310
+ +(NSData *) limitFeedByinch:(double) n;
311
+
312
+ /**
313
+ this command use to stop feeding paper while feed paper wrong.
314
+ 用于设定打印机进纸时,无法检测到垂直间距,发送错误,停止进纸
315
+ LIMITFEED n
316
+ 单位 mm
317
+ @param n the limit length of wrong(in mm).
318
+ */
319
+
320
+ +(NSData *) limitFeedBymm:(double) n;
321
+
322
+
323
+ /**
324
+ this command use to stop feeding paper while feed paper wrong.
325
+ 用于设定打印机进纸时,无法检测到垂直间距,发送错误,停止进纸
326
+ LIMITFEED n
327
+ 单位 dot
328
+ @param n the limit length of wrong(in dots).
329
+ */
330
+
331
+ +(NSData *) limitFeedBydot:(int) n;
332
+
333
+ /**
334
+ At this command ,the printer will print out the printer information
335
+ SELFTEST
336
+
337
+ */
338
+
339
+ +(NSData *) selfTest;
340
+
341
+ /**
342
+ At this command,the printer will print out the printer information
343
+ SELFTEST page
344
+ @param page the one kind of the printer informations.
345
+ */
346
+
347
+ +(NSData *) selfTest:(NSString *) page;
348
+
349
+ /**
350
+ let the printer wait until process of commands (before EOJ) be then go on the next command
351
+ EOJ
352
+
353
+ */
354
+
355
+ +(NSData *) eoj;
356
+
357
+ /**
358
+ let the printer wait specific period of time then go on next command
359
+ DELAY ms
360
+ @param ms print delay how many seconds.
361
+ */
362
+
363
+ +(NSData *) delay:(int) ms;
364
+
365
+ /**
366
+ this command can show the image ,which is in printer's image buffer,on LCD panel
367
+ DISPLAY IMAGE/OFF
368
+ @param str IMAGE showthe image in printer's image buffer,on LCD panel
369
+ OFF disable this finction.
370
+ */
371
+
372
+ +(NSData *) display:(NSString*) str;
373
+
374
+ /**
375
+ this command can restore printer settings to defaults
376
+ INITIALPRINTER
377
+
378
+ */
379
+
380
+ +(NSData *) initialPrinter;
381
+
382
+ /**
383
+ this command draws a bar on the label format.
384
+ BAR x,y,width,heigt
385
+
386
+ @param x the upper left corner x-coordinate (in dots).
387
+ @param y the upper left corner y-coordinate (in dots).
388
+ @param w bar width(in dots).
389
+ @param h bar height(in dots).
390
+
391
+ */
392
+ +(NSData *) barWithX:(int) x andY:(int) y andWidth:(int) w andHeigt:(int) h;
393
+
394
+ /**
395
+ this command prints 1D barcodes
396
+ BARCODE X,Y,"codetype",height,humanreadable,rotation,narrow,wide,"content"
397
+ @param x specify the x-coordinate.
398
+ @param y specify the y-coordinate.
399
+ @param readable HRI readable,0-3;
400
+ @param rotation graphic rotation,0-90-180-270;
401
+ @param narrow space in uint.
402
+ @param wide width of uint.
403
+ @param content barcode's content.
404
+ @param strEnCoding barcode's content's encoding.
405
+ */
406
+ +(NSData *) barcodeWithX:(int) x
407
+ andY:(int) y
408
+ andCodeType:(NSString*) codetype
409
+ andHeight:(int) height
410
+ andHunabReadable:(int) readable
411
+ andRotation:(int) rotation
412
+ andNarrow:(int) narrow
413
+ andWide:(int) wide
414
+ andContent:(NSString*) content
415
+ usStrEnCoding:(NSStringEncoding) strEnCoding;
416
+
417
+
418
+ /**
419
+ this command draws bitmap images.
420
+ BITMAP X,Y,width,height,mode,bitmap data
421
+ @param x specify the x-coordinate
422
+ @param y specify the y-coordinate
423
+ @param mode graphic modes listed below:
424
+ 0:OVERWRINTE
425
+ 1:OR
426
+ 2:XOR
427
+ @param image the graphic you want to print.
428
+ @param bmptype the type you want to print the image.
429
+ */
430
+ +(NSData *) bitmapWithX:(int) x
431
+ andY:(int) y
432
+ andMode:(int) mode
433
+ andImage:(UIImage*) image
434
+ andBmpType:(BmpType) bmptype;
435
+
436
+ /**
437
+ this command draws rectangles on the label
438
+ BOX X,Y,X_END,Y_END,LINE_THICNESS
439
+ @param x specify x-coordinate of upper left corner(in dots).
440
+ @param y specify y-coordinate of upper left corner(in dots).
441
+ @param x_end specify x-coordinate of lower right corner(in dots).
442
+ @param y_end specify y-coordinate of lower right corner(in dots).
443
+ @param thickness sepcify the round corner.default is 0.
444
+ */
445
+ +(NSData *) boxWithX:(int) x
446
+ andY:(int) y
447
+ andEndX:(int) x_end
448
+ andEndY:(int) y_end
449
+ andThickness:(int) thickness;
450
+
451
+ /**
452
+ this command draws an ellipse on the label.
453
+ ELLIPSE X,Y,width,height,thickness.
454
+ @param x specify x-coordinate of upper left corner(in dots).
455
+ @param y specify y-coordinate of upper left corner(in dots).
456
+ @param width specify the width of the ellipse(in dots).
457
+ @param height specify the height of the ellipse(in dots).
458
+
459
+ */
460
+ +(NSData *) ellipseWithX:(int) x
461
+ andY:(int) y
462
+ andWidth:(int) width
463
+ andHeight:(int) height
464
+ andThickness:(int) thickness;
465
+
466
+ /**
467
+ this command draws CODEBLOCK F mode barcode.
468
+ CODABLOCK x,y,rotation,x,"content"
469
+ @param x specify the x-coordinate
470
+ @param y specify the y-coordinate
471
+ @param rotation Rotate rotation degrees clockwise
472
+ @param content content of codablock bar code.
473
+ */
474
+ +(NSData *) codaBlockFModeWithX:(int) x
475
+ andY:(int) y
476
+ andRotation:(int) rotation
477
+ andContent:(NSString*) content;
478
+
479
+ /**
480
+ this command draws an DataMatrix 2d barcode .
481
+ 绘制二维条码DataMatrix
482
+ DMATRIX x,y,width,height,content
483
+ @param x specify x-coordinate of upper left corner(in dots).
484
+ @param y specify y-coordinate of upper left corner(in dots).
485
+ @param width specify the width of DataMatrix.
486
+ @param height specify the height of DataMatrix.
487
+ @param content the content of DataMatrix.
488
+ */
489
+ +(NSData *) dmateixWithX:(int) x
490
+ andY:(int) y
491
+ andWidth:(int) width
492
+ andHeight:(int) height
493
+ andContent:(NSString*) content
494
+ usStrEnCoding:(NSStringEncoding) strEnCoding;
495
+
496
+ /**
497
+ this command clears a specified region in the image buffer
498
+ ERASE x,y,width,height
499
+ @param x the x-coordinate of d=the starting point(in dots).
500
+ @param y the y-coordinate of d=the starting point(in dots).
501
+ @param width the region width in x-axis direction(in dots).
502
+ @param height the region height in y-axis direction(in dots).
503
+ */
504
+ +(NSData *) eraseWithX:(int) x
505
+ andY:(int) y
506
+ andWidth:(int) width
507
+ andHeight:(int) height;
508
+
509
+ /**
510
+ this command defines a PDF417 2d bar code
511
+ PDF417 x,y,width,height,rotatte,"content"
512
+
513
+ */
514
+ +(NSData *) pdf417WithX:(int) x
515
+ andY:(int) y
516
+ andWidth:(int) width
517
+ andHeight:(int) height
518
+ andRotate:(int) rotate
519
+ andContent:(NSString*) content
520
+ usStrEnCoding:(NSStringEncoding) strEnCoding;
521
+ /**
522
+ this command prints BMP format images
523
+ PUTBMP x,y,"filename",bpp,contrast
524
+
525
+ */
526
+ +(NSData *) pubBmpWithX:(int) x
527
+ andY:(int) y
528
+ andFileName:(NSString*) filename
529
+ andContrast:(int) contrast;
530
+
531
+ /**
532
+ this comand prints BMP format images
533
+ PUTBMP x,y,"filename"
534
+ @param x the x-coordinate of the BMP format image
535
+ @param y the y-coordinate of the BMP format image
536
+ @param filename the download BMP filename.
537
+ */
538
+ +(NSData *) putBmpWithX:(int) x
539
+ andY:(int) y
540
+ andFileName:(NSString*) filename;
541
+
542
+ /**
543
+ this command prints PCX format images.
544
+ PUTPCX x,y,"filename"
545
+ @param x the x-coordinate of the BMP format image
546
+ @param y the y-coordinate of the BMP format image
547
+ @param filename the download pcx filename.
548
+
549
+ */
550
+ +(NSData *) putPcxWithX:(int) x
551
+ andY:(int) y
552
+ andFileName:(NSString*) filename;
553
+
554
+ /**
555
+ this command prints qr code
556
+ QRCODE x,y,ecclevel,cell_width,mode,rotation,"content"
557
+ @param x the upper left corner x-coordinate of the QRcode.
558
+ @param y the upper left corner y-coordinate of the QRcode.
559
+ @param ecclevel error correction revovery level.
560
+ @param cellwidth 1~10.
561
+ @param mode A or M.
562
+ @param rotation 0 or 90 or 180 or 270.
563
+ @param content the content of QRcode.
564
+ @param strEnCoding the encoding of content.
565
+ */
566
+ +(NSData *) qrCodeWithX:(int) x
567
+ andY:(int) y
568
+ andEccLevel:(NSString*) ecclevel
569
+ andCellWidth:(int) cellwidth
570
+ andMode:(NSString*) mode
571
+ andRotation:(int) rotation
572
+ andContent:(NSString*) content
573
+ usStrEnCoding:(NSStringEncoding) strEnCoding;
574
+
575
+ /**
576
+ this command reverses a region in image buffer.
577
+ REVERSE x_start,y_start,x_width,y_height
578
+ @param x the x-coordinate of the starting point(in dots).
579
+ @param y the y-coordinate of the starting point(in dots).
580
+ @param width x-axis region width(in dots).
581
+ @param height y-axis region height(in dots).
582
+ */
583
+ +(NSData *) reverseWithX:(int) x
584
+ andY:(int) y
585
+ andWidth:(int) width
586
+ andHeight:(int) height;
587
+
588
+ /**
589
+ this command prints text on label
590
+ TEXT x,y,"font",rotation,x_multiplication,y_multiplication,"content"
591
+ @param x the x-coordinate of text.
592
+ @param y the y-coordinate of text.
593
+ @param font font name.
594
+ @param rotation the rotation angle of text.
595
+ @param x_mul horizontal multiplication,up to 10x.
596
+ @param y_mul vertical multiplication,up to 10x.
597
+ @param content the content of text string.
598
+ @param strEnCoding the encoding of the content string.
599
+ */
600
+ +(NSData *) textWithX:(int) x
601
+ andY:(int) y
602
+ andFont:(NSString*) font
603
+ andRotation:(int) rotation
604
+ andX_mul:(int) x_mul
605
+ andY_mul:(int) y_mul
606
+ andContent:(NSString*) content
607
+ usStrEnCoding:(NSStringEncoding) strEnCoding;
608
+
609
+ /**
610
+ this command prints paragraph on label
611
+ BLOCK x,y,width,"font",rotation,x_mul,y_mul,"content"
612
+
613
+ */
614
+ +(NSData *) blockWithX:(int) x
615
+ andY:(int) y
616
+ andWidth:(int) width
617
+ andHeight:(int) height
618
+ andFont:(NSString*) font
619
+ andRotation:(int) rotaion
620
+ andX_mul:(int) x_mul
621
+ andY_mul:(int) y_mul
622
+
623
+ andConten:(NSString*) content
624
+ usStrEnCoding:(NSStringEncoding) strEnCoding;
625
+
626
+ /**
627
+ this command obiains the printer status at any time.
628
+ <ESC> !?
629
+ 1D 61 1F
630
+ */
631
+
632
+ +(NSData *) checkPrinterStatusByPort9100;
633
+
634
+ /**
635
+ this command obiains the printer status at any time.
636
+
637
+ 1B 76 00
638
+ */
639
+
640
+ +(NSData *) checkPrinterStatusByPort4000;
641
+
642
+
643
+ /**
644
+ Download 程序档
645
+ DOWNLOAD "EXAMPLE.BAS"
646
+
647
+ */
648
+
649
+ +(NSData *) download:(NSString*) filename;
650
+
651
+
652
+ /**
653
+
654
+ Download 文本档
655
+ DOWNLOAD "FILENAME",DATASIZE,CONTENT
656
+
657
+ */
658
+
659
+ +(NSData *) download:(NSString*) filename
660
+ andSize:(int) size
661
+ andConten:(NSString*) content;
662
+
663
+
664
+ /**
665
+ Download 文本文件档
666
+ DOWNLOAD "FILENAME",FILE SIZE,DATA CONTENT
667
+
668
+ */
669
+
670
+ +(NSData *) download:(NSString*) filename
671
+ andPath:(NSURL*) url;
672
+
673
+
674
+ /**
675
+ Download 图档
676
+ DOWNLOAD "EXAMPLE.BAS"
677
+
678
+ */
679
+
680
+ //+(NSData *) download:(NSString*) filename
681
+ // andImage:(UIImage*) image;
682
+
683
+ /**
684
+ End of program,to declare the start and the end of BASIC language used in progra.
685
+ EOP
686
+
687
+ */
688
+
689
+ +(NSData *) eop;
690
+
691
+ /**
692
+ this command prints out the total memory size,available memory size and files lists in the printer memory.
693
+ FILES
694
+
695
+ */
696
+
697
+ +(NSData *) files;
698
+
699
+ /**
700
+ this command delects a file in the printer memory
701
+ KILL "FILENAME"
702
+
703
+ */
704
+
705
+ +(NSData *) kill:(NSString*) filename;
706
+
707
+ /**
708
+ this command moves download files from DRAM to FLASH memory.
709
+ MOVE
710
+
711
+ */
712
+
713
+ +(NSData *) move;
714
+
715
+ /**
716
+ this command executes a program resdent in the printer memory.it is available for TSPL2 printers only.
717
+ RUN "FILENAME.BAS"
718
+
719
+ */
720
+
721
+ +(NSData *) run:(NSString*) filename;
722
+
723
+ @end