@m430/capacitor-label-printer 0.1.0

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 (150) hide show
  1. package/API.md +218 -0
  2. package/LICENSE +21 -0
  3. package/M430CapacitorLabelPrinter.podspec +21 -0
  4. package/README.md +190 -0
  5. package/android/build.gradle +46 -0
  6. package/android/libs/.gitkeep +1 -0
  7. package/android/libs/fat-generic-tspl-bluetooth-classic-0.1.16-GA.jar +0 -0
  8. package/android/src/main/AndroidManifest.xml +12 -0
  9. package/android/src/main/java/com/m430/capacitor/labelprinter/.gitkeep +1 -0
  10. package/android/src/main/java/com/m430/capacitor/labelprinter/AndroidPrinterManager.java +132 -0
  11. package/android/src/main/java/com/m430/capacitor/labelprinter/AndroidStatusMapper.java +54 -0
  12. package/android/src/main/java/com/m430/capacitor/labelprinter/LabelPrinterPlugin.java +273 -0
  13. package/android/src/main/java/com/m430/capacitor/labelprinter/VendorAndroidDeviceCatalog.java +81 -0
  14. package/android/src/main/java/com/m430/capacitor/labelprinter/VendorAndroidPrinterSession.java +189 -0
  15. package/capacitor-label-printer.podspec +21 -0
  16. package/dist/docs.json +443 -0
  17. package/dist/esm/cpcl/builder.d.ts +10 -0
  18. package/dist/esm/cpcl/builder.js +35 -0
  19. package/dist/esm/definitions.d.ts +107 -0
  20. package/dist/esm/definitions.js +1 -0
  21. package/dist/esm/errors.d.ts +1 -0
  22. package/dist/esm/errors.js +1 -0
  23. package/dist/esm/index.d.ts +9 -0
  24. package/dist/esm/index.js +11 -0
  25. package/dist/esm/tspl/builder.d.ts +13 -0
  26. package/dist/esm/tspl/builder.js +45 -0
  27. package/dist/esm/tspl/helpers.d.ts +2 -0
  28. package/dist/esm/tspl/helpers.js +6 -0
  29. package/dist/esm/types.d.ts +12 -0
  30. package/dist/esm/types.js +1 -0
  31. package/dist/esm/web.d.ts +21 -0
  32. package/dist/esm/web.js +34 -0
  33. package/dist/plugin.cjs.js +143 -0
  34. package/dist/plugin.cjs.js.map +1 -0
  35. package/dist/plugin.js +136 -0
  36. package/dist/plugin.js.map +1 -0
  37. package/ios/Plugin/.gitkeep +1 -0
  38. package/ios/Plugin/IOSPrinterManager.swift +230 -0
  39. package/ios/Plugin/IOSStatusMapper.swift +57 -0
  40. package/ios/Plugin/LabelPrinterPlugin.swift +141 -0
  41. package/ios/VendorFrameworks/.gitkeep +1 -0
  42. package/ios/VendorFrameworks/adapter.framework/Headers/BasedOtherConnectedDevice.h +17 -0
  43. package/ios/VendorFrameworks/adapter.framework/Headers/ConnectedDevice.h +213 -0
  44. package/ios/VendorFrameworks/adapter.framework/Headers/IPRTBlueToothBaseDef.h +22 -0
  45. package/ios/VendorFrameworks/adapter.framework/Headers/KeepStateConnectedDevice.h +18 -0
  46. package/ios/VendorFrameworks/adapter.framework/Headers/QueueConfig.h +18 -0
  47. package/ios/VendorFrameworks/adapter.framework/Headers/ReadOptions.h +22 -0
  48. package/ios/VendorFrameworks/adapter.framework/Headers/WroteReporter.h +23 -0
  49. package/ios/VendorFrameworks/adapter.framework/Headers/adapter.h +18 -0
  50. package/ios/VendorFrameworks/adapter.framework/Info.plist +0 -0
  51. package/ios/VendorFrameworks/adapter.framework/Modules/module.modulemap +6 -0
  52. package/ios/VendorFrameworks/adapter.framework/adapter +0 -0
  53. package/ios/VendorFrameworks/appleble.framework/Frameworks/adapter.framework/Info.plist +0 -0
  54. package/ios/VendorFrameworks/appleble.framework/Frameworks/adapter.framework/_CodeSignature/CodeResources +101 -0
  55. package/ios/VendorFrameworks/appleble.framework/Frameworks/adapter.framework/adapter +0 -0
  56. package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/Frameworks/adapter.framework/Info.plist +0 -0
  57. package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/Frameworks/adapter.framework/adapter +0 -0
  58. package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/Info.plist +0 -0
  59. package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/_CodeSignature/CodeResources +132 -0
  60. package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/ibridge +0 -0
  61. package/ios/VendorFrameworks/appleble.framework/Headers/AppleBle.h +25 -0
  62. package/ios/VendorFrameworks/appleble.framework/Info.plist +0 -0
  63. package/ios/VendorFrameworks/appleble.framework/Modules/module.modulemap +6 -0
  64. package/ios/VendorFrameworks/appleble.framework/_CodeSignature/CodeResources +252 -0
  65. package/ios/VendorFrameworks/appleble.framework/appleble +0 -0
  66. package/ios/VendorFrameworks/father.framework/Frameworks/adapter.framework/Info.plist +0 -0
  67. package/ios/VendorFrameworks/father.framework/Frameworks/adapter.framework/adapter +0 -0
  68. package/ios/VendorFrameworks/father.framework/Headers/Appendat.h +28 -0
  69. package/ios/VendorFrameworks/father.framework/Headers/Arg.h +22 -0
  70. package/ios/VendorFrameworks/father.framework/Headers/BasicBatteryVolumeArg.h +16 -0
  71. package/ios/VendorFrameworks/father.framework/Headers/BinaryCommand.h +17 -0
  72. package/ios/VendorFrameworks/father.framework/Headers/CPCLCommand.h +10 -0
  73. package/ios/VendorFrameworks/father.framework/Headers/CallbackData.h +26 -0
  74. package/ios/VendorFrameworks/father.framework/Headers/Checker.h +16 -0
  75. package/ios/VendorFrameworks/father.framework/Headers/Command.h +25 -0
  76. package/ios/VendorFrameworks/father.framework/Headers/CommandClause.h +33 -0
  77. package/ios/VendorFrameworks/father.framework/Headers/Commander.h +31 -0
  78. package/ios/VendorFrameworks/father.framework/Headers/DataWriteOperation.h +42 -0
  79. package/ios/VendorFrameworks/father.framework/Headers/DefaultCommand.h +16 -0
  80. package/ios/VendorFrameworks/father.framework/Headers/EasyArg.h +16 -0
  81. package/ios/VendorFrameworks/father.framework/Headers/FastBinary.h +20 -0
  82. package/ios/VendorFrameworks/father.framework/Headers/HexOutput.h +19 -0
  83. package/ios/VendorFrameworks/father.framework/Headers/IDataWriteCallback.h +25 -0
  84. package/ios/VendorFrameworks/father.framework/Headers/Lifecycle.h +21 -0
  85. package/ios/VendorFrameworks/father.framework/Headers/NewLineArg.h +15 -0
  86. package/ios/VendorFrameworks/father.framework/Headers/OnlyBinaryHeaderArg.h +15 -0
  87. package/ios/VendorFrameworks/father.framework/Headers/OnlyTextHeaderArg.h +16 -0
  88. package/ios/VendorFrameworks/father.framework/Headers/PImageTool.h +22 -0
  89. package/ios/VendorFrameworks/father.framework/Headers/PReplaceKit.h +16 -0
  90. package/ios/VendorFrameworks/father.framework/Headers/PSDK.h +60 -0
  91. package/ios/VendorFrameworks/father.framework/Headers/PVariableKit.h +18 -0
  92. package/ios/VendorFrameworks/father.framework/Headers/PsdkConst.h +33 -0
  93. package/ios/VendorFrameworks/father.framework/Headers/Raw.h +22 -0
  94. package/ios/VendorFrameworks/father.framework/Headers/SimpleCheck.h +16 -0
  95. package/ios/VendorFrameworks/father.framework/Headers/SingleCommand.h +32 -0
  96. package/ios/VendorFrameworks/father.framework/Headers/TSPLCommand.h +10 -0
  97. package/ios/VendorFrameworks/father.framework/Headers/WriteControl.h +12 -0
  98. package/ios/VendorFrameworks/father.framework/Headers/WriteOptions.h +28 -0
  99. package/ios/VendorFrameworks/father.framework/Headers/father.h +21 -0
  100. package/ios/VendorFrameworks/father.framework/Info.plist +0 -0
  101. package/ios/VendorFrameworks/father.framework/Modules/module.modulemap +6 -0
  102. package/ios/VendorFrameworks/father.framework/father +0 -0
  103. package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/Frameworks/adapter.framework/Info.plist +0 -0
  104. package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/Frameworks/adapter.framework/adapter +0 -0
  105. package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/Info.plist +0 -0
  106. package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/father +0 -0
  107. package/ios/VendorFrameworks/tspl.framework/Headers/BasicTSPL.h +146 -0
  108. package/ios/VendorFrameworks/tspl.framework/Headers/BasicTSPLArg.h +17 -0
  109. package/ios/VendorFrameworks/tspl.framework/Headers/GenericTSPL.h +16 -0
  110. package/ios/VendorFrameworks/tspl.framework/Headers/TBar.h +30 -0
  111. package/ios/VendorFrameworks/tspl.framework/Headers/TBarCode.h +54 -0
  112. package/ios/VendorFrameworks/tspl.framework/Headers/TBatteryVolume.h +19 -0
  113. package/ios/VendorFrameworks/tspl.framework/Headers/TBox.h +32 -0
  114. package/ios/VendorFrameworks/tspl.framework/Headers/TCircle.h +26 -0
  115. package/ios/VendorFrameworks/tspl.framework/Headers/TCleanBmpFlash.h +20 -0
  116. package/ios/VendorFrameworks/tspl.framework/Headers/TClear.h +20 -0
  117. package/ios/VendorFrameworks/tspl.framework/Headers/TCut.h +21 -0
  118. package/ios/VendorFrameworks/tspl.framework/Headers/TDensity.h +21 -0
  119. package/ios/VendorFrameworks/tspl.framework/Headers/TDirection.h +51 -0
  120. package/ios/VendorFrameworks/tspl.framework/Headers/TDmatrix.h +29 -0
  121. package/ios/VendorFrameworks/tspl.framework/Headers/TDownloadBmpFlash.h +16 -0
  122. package/ios/VendorFrameworks/tspl.framework/Headers/TGap.h +21 -0
  123. package/ios/VendorFrameworks/tspl.framework/Headers/TImage.h +36 -0
  124. package/ios/VendorFrameworks/tspl.framework/Headers/TLine.h +34 -0
  125. package/ios/VendorFrameworks/tspl.framework/Headers/TMddle.h +16 -0
  126. package/ios/VendorFrameworks/tspl.framework/Headers/TPage.h +22 -0
  127. package/ios/VendorFrameworks/tspl.framework/Headers/TPrint.h +21 -0
  128. package/ios/VendorFrameworks/tspl.framework/Headers/TQRCode.h +35 -0
  129. package/ios/VendorFrameworks/tspl.framework/Headers/TReadState.h +16 -0
  130. package/ios/VendorFrameworks/tspl.framework/Headers/TReverse.h +27 -0
  131. package/ios/VendorFrameworks/tspl.framework/Headers/TSN.h +19 -0
  132. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLCodeType.h +53 -0
  133. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLCorrectLevel.h +21 -0
  134. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLFont.h +83 -0
  135. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLImageMode.h +30 -0
  136. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLLineMode.h +37 -0
  137. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLLineType.h +21 -0
  138. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLOutDirection.h +27 -0
  139. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLRotation.h +36 -0
  140. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLShowType.h +36 -0
  141. package/ios/VendorFrameworks/tspl.framework/Headers/TSPL_.h +18 -0
  142. package/ios/VendorFrameworks/tspl.framework/Headers/TSpeed.h +20 -0
  143. package/ios/VendorFrameworks/tspl.framework/Headers/TText.h +38 -0
  144. package/ios/VendorFrameworks/tspl.framework/Headers/TTextBox.h +44 -0
  145. package/ios/VendorFrameworks/tspl.framework/Headers/TVersion.h +19 -0
  146. package/ios/VendorFrameworks/tspl.framework/Headers/tspl.h +45 -0
  147. package/ios/VendorFrameworks/tspl.framework/Info.plist +0 -0
  148. package/ios/VendorFrameworks/tspl.framework/Modules/module.modulemap +6 -0
  149. package/ios/VendorFrameworks/tspl.framework/tspl +0 -0
  150. package/package.json +95 -0
@@ -0,0 +1,146 @@
1
+ //
2
+ // BasicTSPL.h
3
+ // tspl
4
+ //
5
+ // Created by IPRT on 2022/11/19.
6
+ //
7
+
8
+ #import <father/father.h>
9
+ #import <adapter/adapter.h>
10
+ #import <tspl/tspl.h>
11
+ NS_ASSUME_NONNULL_BEGIN
12
+
13
+ @interface BasicTSPL<T> : PSDK
14
+ @property(nonatomic , readonly) BasicTSPL *(^BasicTSPL)(Lifecycle *lifecycle,TSPLPrinter printer);
15
+
16
+ -(ConnectedDevice *)getConnectedDevice;
17
+ -(TSPLPrinter)getPrinter;
18
+ /**
19
+ * 画线(只能画横竖线)
20
+ */
21
+ @property(nonatomic , readonly) BasicTSPL *(^bar)(TBar *arg);
22
+ /**
23
+ * 画线(能画斜线)
24
+ */
25
+ @property(nonatomic , readonly) BasicTSPL *(^line)(TLine *arg);
26
+
27
+ /**
28
+ * 二维码
29
+ */
30
+ @property(nonatomic , readonly) BasicTSPL *(^barcode)(TBarCode *arg);
31
+ /**
32
+ * 打印边框
33
+ */
34
+ @property(nonatomic , readonly) BasicTSPL *(^box)(TBox *arg);
35
+
36
+ /**
37
+ * 画圆
38
+ */
39
+ @property(nonatomic , readonly) BasicTSPL *(^circle)(TCircle *arg);
40
+ /**
41
+ * 清除页面缓冲区
42
+ */
43
+ @property(nonatomic , readonly) BasicTSPL *(^cls)(void);
44
+ /**
45
+ * 创建标签页面大小
46
+ */
47
+ @property(nonatomic , readonly) BasicTSPL *(^page)(TPage *arg);
48
+ /**
49
+ * 使能切刀
50
+ *
51
+ * @param enable true:使能 false:不使能
52
+ * @return
53
+ */
54
+ @property(nonatomic , readonly) BasicTSPL *(^cut)(BOOL enable);
55
+ /**
56
+ * 设置浓度
57
+ *
58
+ * @param density 浓度值(0-15)
59
+ * @return
60
+ */
61
+ @property(nonatomic , readonly) BasicTSPL *(^density)(int density);
62
+
63
+ /**
64
+ * 设置打印方向
65
+ */
66
+ @property(nonatomic , readonly) BasicTSPL *(^direction)(TDirection *arg);
67
+ /**
68
+ * 打印二维条码DATAMATRIX
69
+ */
70
+ @property(nonatomic , readonly)BasicTSPL *(^dmatrix)(TDmatrix *arg);
71
+ /**
72
+ * 打印图片
73
+ */
74
+ @property(nonatomic , readonly)BasicTSPL *(^image)(TImage *arg);
75
+ /**
76
+ * 打印标签
77
+ */
78
+ @property(nonatomic , readonly)BasicTSPL *(^print)(void);
79
+ /**
80
+ * 打印标签
81
+ *
82
+ * @param copies 打印份数
83
+ * @return
84
+ */
85
+ @property(nonatomic , readonly)BasicTSPL *(^printWithCopies)(int copies);
86
+ /**
87
+ * 二维码
88
+ */
89
+ @property(nonatomic , readonly)BasicTSPL *(^qrcode)(TQRCode *arg);
90
+ /**
91
+ * 反色
92
+ */
93
+ @property(nonatomic , readonly)BasicTSPL *(^reverse)(TReverse *arg);
94
+
95
+ /**
96
+ * 查询状态
97
+ */
98
+ @property(nonatomic , readonly)BasicTSPL *(^state)(void);
99
+
100
+ /**
101
+ * 定位缝隙
102
+ */
103
+
104
+ @property(nonatomic , readonly)BasicTSPL *(^gap)(BOOL enable);
105
+ /**
106
+ * 查询SN
107
+ */
108
+ @property(nonatomic , readonly)BasicTSPL *(^sn)(void);
109
+ /**
110
+ * 设置速度
111
+ *
112
+ * @param speed 速度值 (范围1、1.5、2、2.5~6),建议设置3~4区间
113
+ * @return T
114
+ */
115
+ @property(nonatomic , readonly)BasicTSPL *(^speed)(int speed);
116
+ /**
117
+ * 打印文本
118
+ */
119
+ @property(nonatomic , readonly)BasicTSPL *(^text)(TText *arg);
120
+
121
+ /**
122
+ * 打印文本框
123
+ */
124
+
125
+ @property(nonatomic , readonly)BasicTSPL *(^textBox)(TTextBox *arg);
126
+ /**
127
+ * 查询版本
128
+ */
129
+ @property(nonatomic , readonly)BasicTSPL *(^version)(void);
130
+
131
+ @property(nonatomic , readonly)BasicTSPL *(^mddle)(void);
132
+ /**
133
+ * 清除位图
134
+ */
135
+ @property(nonatomic , readonly)BasicTSPL *(^cleanFlash)(int index);
136
+ /**
137
+ * 下载位图
138
+ */
139
+ @property(nonatomic , readonly)BasicTSPL *(^downloadFlash)(int index, NSData *data);
140
+ /**
141
+ * 下载位图
142
+ */
143
+ @property(nonatomic , readonly)BasicTSPL *(^downloadFlashWithArg)(TDownloadBmpFlash *arg);
144
+ @end
145
+
146
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,17 @@
1
+ //
2
+ // BasicTSPLArg.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/11.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <father/EasyArg.h>
10
+ #import <father/TSPLCommand.h>
11
+ NS_ASSUME_NONNULL_BEGIN
12
+
13
+ @interface BasicTSPLArg : EasyArg
14
+
15
+ @end
16
+
17
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,16 @@
1
+ //
2
+ // GenericTSPL.h
3
+ // tspl
4
+ //
5
+ // Created by IPRT on 2022/11/24.
6
+ //
7
+
8
+ #import <tspl/tspl.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ @interface GenericTSPL : BasicTSPL
13
+ @property(nonatomic , readonly) GenericTSPL *(^GenericTSPL)(Lifecycle *lifecycle);
14
+ @end
15
+
16
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,30 @@
1
+ //
2
+ // TBar.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/11.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ #import <tspl/TSPLLineType.h>
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ /**
13
+ * 画线
14
+ */
15
+ @interface TBar : BasicTSPLArg
16
+
17
+ /// 起始x坐标
18
+ @property(nonatomic , readonly) TBar *(^x)(int startX);
19
+ /// 起始y坐标
20
+ @property(nonatomic , readonly) TBar *(^y)(int startY);
21
+ /// 线宽
22
+ @property(nonatomic , readonly) TBar *(^width)(int lineWidth);
23
+ /// 线高
24
+ @property(nonatomic , readonly) TBar *(^height)(int lineHeight);
25
+ /// 线框类型: 实线 或 虚线:(默认实线)
26
+ @property(nonatomic , readonly) TBar *(^lineType)(TLineType l);
27
+
28
+ @end
29
+
30
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,54 @@
1
+ //
2
+ // TBarCode.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/11.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ #import <tspl/TSPLCodeType.h>
10
+ #import <tspl/TSPLShowType.h>
11
+ #import <tspl/TSPLRotation.h>
12
+ NS_ASSUME_NONNULL_BEGIN
13
+
14
+ /**
15
+ * 打印一维条码
16
+ */
17
+ @interface TBarCode : BasicTSPLArg
18
+
19
+ /**
20
+ * 条码起始x坐标
21
+ */
22
+ @property (nonatomic , readonly) TBarCode *(^x)(int startX);
23
+ /**
24
+ * 条码起始y坐标
25
+ */
26
+ @property (nonatomic , readonly) TBarCode *(^y)(int startY);
27
+ /**
28
+ * 条码类型(默认CODE128)
29
+ */
30
+ @property (nonatomic , readonly) TBarCode *(^codeType)(TCodeType ctype);
31
+ /**
32
+ * 条码高度
33
+ */
34
+ @property (nonatomic , readonly) TBarCode *(^height)(int h);
35
+ /**
36
+ * 文字显示方式(默认不显示)
37
+ */
38
+ @property (nonatomic , readonly) TBarCode *(^showType)(TShowType stype);
39
+ /**
40
+ * 条码旋转角度(默认不旋转)
41
+ */
42
+ @property (nonatomic , readonly) TBarCode *(^rotation)(TRotation rot);
43
+ /**
44
+ * 条码线宽度
45
+ */
46
+ @property (nonatomic , readonly) TBarCode *(^cellwidth)(int width);
47
+ /**
48
+ * 条码内容
49
+ */
50
+ @property (nonatomic , readonly) TBarCode *(^content)(NSString * cnt);
51
+
52
+ @end
53
+
54
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,19 @@
1
+ //
2
+ // TBAtteryVolume.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/11.
6
+ //
7
+
8
+ #import <father/OnlyTextHeaderArg.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ /**
13
+ * 查询电量
14
+ */
15
+ @interface TBatteryVolume : OnlyTextHeaderArg
16
+
17
+ @end
18
+
19
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,32 @@
1
+ //
2
+ // TBox.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/11.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ /**
13
+ * 打印边框
14
+ */
15
+ @interface TBox : BasicTSPLArg
16
+
17
+ /// 左上角起始点 x 坐标
18
+ @property(nonatomic , readonly) TBox *(^startX)(int sx);
19
+ /// 左上角起始点 y 坐标
20
+ @property(nonatomic , readonly) TBox *(^startY)(int sy);
21
+ /// 右下角结束点 x 坐标
22
+ @property(nonatomic , readonly) TBox *(^endX)(int ex);
23
+ /// 右下角结束点 y 坐标
24
+ @property(nonatomic , readonly) TBox *(^endY)(int ey);
25
+ /// 线宽
26
+ @property(nonatomic , readonly) TBox *(^width)(int lineWidth);
27
+ /// 圆角半径
28
+ @property(nonatomic , readonly) TBox *(^radius)(int r);
29
+
30
+ @end
31
+
32
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,26 @@
1
+ //
2
+ // TCircle.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ NS_ASSUME_NONNULL_BEGIN
10
+ /**
11
+ * 画圆
12
+ */
13
+ @interface TCircle : BasicTSPLArg
14
+
15
+ /// 圆心x坐标
16
+ @property(nonatomic , readonly) TCircle *(^startX)(int sx);
17
+ /// 圆心y坐标
18
+ @property(nonatomic , readonly) TCircle *(^startY)(int sy);
19
+ /// 线宽
20
+ @property(nonatomic , readonly) TCircle *(^width)(int lineWidth);
21
+ /// 半径
22
+ @property(nonatomic , readonly) TCircle *(^radius)(int r);
23
+
24
+ @end
25
+
26
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,20 @@
1
+ //
2
+ // TCleanBmpFlash.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ NS_ASSUME_NONNULL_BEGIN
10
+
11
+ @interface TCleanBmpFlash : BasicTSPLArg
12
+
13
+ /**
14
+ * 索引
15
+ */
16
+ @property (nonatomic , readonly) TCleanBmpFlash *(^index)(int ind);
17
+
18
+ @end
19
+
20
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,20 @@
1
+ //
2
+ // TClear.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import <father/OnlyTextHeaderArg.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ /**
13
+ * 清除页面缓冲区
14
+ *
15
+ */
16
+ @interface TClear : OnlyTextHeaderArg
17
+
18
+ @end
19
+
20
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,21 @@
1
+ //
2
+ // TCut.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ NS_ASSUME_NONNULL_BEGIN
10
+
11
+ /**
12
+ * 使能切刀
13
+ */
14
+ @interface TCut : BasicTSPLArg
15
+
16
+ /// 是否使能切刀(默认否)
17
+ @property (nonatomic , readonly) TCut *(^enable)(BOOL isEnable);
18
+
19
+ @end
20
+
21
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,21 @@
1
+ //
2
+ // TDensity.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ NS_ASSUME_NONNULL_BEGIN
10
+
11
+ /**
12
+ * 设置浓度
13
+ */
14
+ @interface TDensity : BasicTSPLArg
15
+
16
+ /// 浓度值 (0~15)
17
+ @property (nonatomic , readonly) TDensity *(^density)(int dens);
18
+
19
+ @end
20
+
21
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,51 @@
1
+ //
2
+ // TDirection.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ /**
10
+ * 镜像
11
+ */
12
+ typedef NS_ENUM (NSInteger, Mirror) {
13
+ /// 不镜像
14
+ NO_MIRROR = 0,
15
+ /// 镜像
16
+ MIRROR = 1
17
+ };
18
+
19
+ /**
20
+ * 方向
21
+ */
22
+ typedef NS_ENUM (NSInteger, Direction) {
23
+ /// 上端先出
24
+ UP_OUT = 0,
25
+ /// 下端先出
26
+ DOWN_OUT = 1
27
+ };
28
+
29
+ NS_ASSUME_NONNULL_BEGIN
30
+
31
+ /**
32
+ * 设置打印方向
33
+ */
34
+ @interface TDirection : BasicTSPLArg
35
+
36
+ /// 镜像
37
+ @property (nonatomic , readonly) TDirection *(^mirror)(Mirror mir);
38
+ /// 方向
39
+ @property (nonatomic , readonly) TDirection *(^direction)(Direction dir);
40
+ /**
41
+ * 获取镜像
42
+ */
43
+ -(NSInteger)getMirror;
44
+ /**
45
+ * 获取方向
46
+ */
47
+ -(NSInteger)getDirection;
48
+
49
+ @end
50
+
51
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,29 @@
1
+ //
2
+ // TDmatrix.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ NS_ASSUME_NONNULL_BEGIN
10
+
11
+ /**
12
+ * 二维条码
13
+ */
14
+ @interface TDmatrix : BasicTSPLArg
15
+
16
+ /// 起始x坐标
17
+ @property(nonatomic , readonly) TDmatrix *(^x)(int startX);
18
+ /// 起始y坐标
19
+ @property(nonatomic , readonly) TDmatrix *(^y)(int startY);
20
+ /// 条码宽度
21
+ @property(nonatomic , readonly) TDmatrix *(^width)(int lineWidth);
22
+ /// 条码高度
23
+ @property(nonatomic , readonly) TDmatrix *(^height)(int lineHight);
24
+ /// 条码内容
25
+ @property(nonatomic , readonly) TDmatrix *(^content)(NSString *cnt);
26
+
27
+ @end
28
+
29
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,16 @@
1
+ //
2
+ // TDownloadBmpFlash.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ NS_ASSUME_NONNULL_BEGIN
10
+
11
+ @interface TDownloadBmpFlash : BasicTSPLArg
12
+ @property (nonatomic , readonly) TDownloadBmpFlash *(^index)(int ind);
13
+ @property (nonatomic , readonly) TDownloadBmpFlash *(^data)(NSData *dat);
14
+ @end
15
+
16
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,21 @@
1
+ //
2
+ // TGap.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ NS_ASSUME_NONNULL_BEGIN
10
+
11
+ /**
12
+ * 打印完毕定位到缝隙
13
+ */
14
+ @interface TGap : BasicTSPLArg
15
+
16
+ /// 是否定位但缝隙, true:定位到缝隙;false:不定位
17
+ @property (nonatomic , readonly) TGap *(^enable)(BOOL isEnable);
18
+
19
+ @end
20
+
21
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,36 @@
1
+ //
2
+ // TImage.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ #import <tspl/TSPLImageMode.h>
10
+ #import <UIKit/UIKit.h>
11
+ NS_ASSUME_NONNULL_BEGIN
12
+
13
+ /**
14
+ * 图片
15
+ */
16
+ @interface TImage : BasicTSPLArg
17
+
18
+ /// 图片起始x坐标
19
+ @property (nonatomic , readonly) TImage *(^x)(int originX);
20
+ /// 图片起始y坐标
21
+ @property (nonatomic , readonly) TImage *(^y)(int originY);
22
+ /// 图片
23
+ @property (nonatomic , readonly) TImage *(^image)(UIImage *img);
24
+ /// 图片宽度
25
+ @property (nonatomic , readonly) TImage *(^width)(int imageWidth);
26
+ /// 图片高度
27
+ @property (nonatomic , readonly) TImage *(^height)(int imageHeight);
28
+ /// 是否压缩
29
+ @property (nonatomic , readonly) TImage *(^compress)(BOOL isCompress);
30
+ /// 图片模式
31
+ @property (nonatomic , readonly) TImage *(^mode)(TImageMode imageMode);
32
+ /// 是否反色
33
+ @property (nonatomic , readonly) TImage *(^reverse)(BOOL isReverse);
34
+ @end
35
+
36
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,34 @@
1
+ //
2
+ // TLine.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import <tspl/BasicTSPLArg.h>
9
+ #import "TSPLLineMode.h"
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ /**
13
+ * 画线
14
+ */
15
+ @interface TLine : BasicTSPLArg
16
+
17
+ /// 起始x坐标
18
+ @property (nonatomic , readonly) TLine *(^start_x)(int startx);
19
+ /// 起始y坐标
20
+ @property (nonatomic , readonly) TLine *(^start_y)(int starty);
21
+ /// 结束x坐标
22
+ @property (nonatomic , readonly) TLine *(^end_x)(int endx);
23
+ /// 结束y坐标
24
+ @property (nonatomic , readonly) TLine *(^end_y)(int endy);
25
+ /// 线宽
26
+ @property (nonatomic , readonly) TLine *(^width)(int lineWidth);
27
+ /// 线高
28
+ @property (nonatomic , readonly) TLine *(^height)(int lineHeight);
29
+ /// 实线/虚线 0-实线;1-4虚线
30
+ @property (nonatomic , readonly) TLine *(^lineMode)(TLineMode l);
31
+
32
+ @end
33
+
34
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,16 @@
1
+ //
2
+ // TMddle.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+
8
+ #import<father/OnlyTextHeaderArg.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ @interface TMddle : OnlyTextHeaderArg
13
+
14
+ @end
15
+
16
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,22 @@
1
+ //
2
+ // TPage.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+ #import <tspl/BasicTSPLArg.h>
8
+ NS_ASSUME_NONNULL_BEGIN
9
+
10
+ /**
11
+ * 创建标签页面
12
+ */
13
+ @interface TPage : BasicTSPLArg
14
+
15
+ /// 标签宽度,单位 mm
16
+ @property (nonatomic , readonly) TPage *(^width)(int width);
17
+ /// 标签高度,单位 mm
18
+ @property (nonatomic , readonly) TPage *(^height)(int height);
19
+
20
+ @end
21
+
22
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,21 @@
1
+ //
2
+ // TPrint.h
3
+ // TSPL
4
+ //
5
+ // Created by IPRT on 2022/10/12.
6
+ //
7
+ #import <tspl/BasicTSPLArg.h>
8
+ NS_ASSUME_NONNULL_BEGIN
9
+
10
+ /**
11
+ * 打印份数
12
+ */
13
+
14
+ @interface TPrint : BasicTSPLArg
15
+
16
+ /// 打印份数
17
+ @property (nonatomic , readonly) TPrint *(^copies)(int copyCount);
18
+
19
+ @end
20
+
21
+ NS_ASSUME_NONNULL_END