@rdlabo/capacitor-brotherprint 6.2.0-2 → 6.3.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.
@@ -1,63 +1,107 @@
1
1
  package jp.rdlabo.capacitor.plugin.brotherprint.models
2
2
 
3
- import com.brother.ptouch.sdk.Printer
4
- import com.brother.ptouch.sdk.PrinterInfo
3
+ import com.brother.sdk.lmprinter.setting.CustomPaperSize
4
+ import com.brother.sdk.lmprinter.setting.PrintImageSettings
5
+ import com.brother.sdk.lmprinter.setting.QLPrintSettings
6
+ import com.brother.sdk.lmprinter.setting.TDPrintSettings
5
7
  import com.getcapacitor.PluginCall
6
8
 
9
+
7
10
  class BrotherPrintSettings {
8
- public fun initialize(call: PluginCall, printer: Printer): PrinterInfo {
9
- val settings = printer.printerInfo
10
- settings.paperSize = PrinterInfo.PaperSize.CUSTOM
11
- settings.numberOfCopies = call.getInt("numberOfCopies", 1)!!
12
- settings.isAutoCut = call.getBoolean("autoCut", true)!!
11
+ public fun modelTDSettings(call: PluginCall, settings: TDPrintSettings): TDPrintSettings {
12
+ val baseSettings = this.baseSettings(call, settings);
13
+
14
+ val margins = CustomPaperSize.Margins(
15
+ call.getFloat("marginTop", 0f)!!,
16
+ call.getFloat("marginRight", 0f)!!,
17
+ call.getFloat("marginBottom", 0f)!!,
18
+ call.getFloat("marginLeft", 0f)!!,
19
+ )
20
+
21
+ val unit: CustomPaperSize.Unit = when(call.getString("paperUnit", "mm")) {
22
+ "mm" -> CustomPaperSize.Unit.Mm
23
+ "inch" -> CustomPaperSize.Unit.Inch
24
+ else -> {
25
+ throw RuntimeException(call.getString("paperUnit") + " is not supported.")
26
+ }
27
+ }
28
+
29
+ val customPaperSize: CustomPaperSize = when (call.getString("paperType")) {
30
+ "rollPaper" -> CustomPaperSize.newRollPaperSize(call.getFloat("tapeWidth", 0f)!!, margins, unit)
31
+ "dieCutPaper" -> CustomPaperSize.newDieCutPaperSize(call.getFloat("tapeWidth", 0f)!!, call.getFloat("tapeLength", 0f)!!, margins,
32
+ call.getFloat("gapLength", 0f)!!, unit)
33
+ "markRollPaper" -> CustomPaperSize.newMarkRollPaperSize(call.getFloat("tapeWidth", 0f)!!, call.getFloat("tapeLength", 0f)!!, margins,
34
+ call.getFloat("paperMarkPosition", 0f)!!, call.getFloat("paperMarkLength", 0f)!!, unit)
35
+ else -> {
36
+ throw RuntimeException(call.getString("paperType") + " is not supported.")
37
+ }
38
+ }
39
+
40
+ baseSettings.customPaperSize = customPaperSize
41
+ baseSettings.isAutoCut = call.getBoolean("autoCut", true)!!
42
+
43
+ return baseSettings
44
+ }
45
+
46
+ public fun modelQLSettings(call: PluginCall, settings: QLPrintSettings): QLPrintSettings {
47
+ val baseSettings = this.baseSettings(call, settings);
48
+
49
+ baseSettings.isAutoCut = call.getBoolean("autoCut", true)!!
50
+ baseSettings.labelSize = QLPrintSettings.LabelSize.entries.find { it.name == call.getString("labelName", "W62") }
51
+
52
+ return baseSettings;
53
+ }
54
+
55
+ private fun <T: PrintImageSettings> baseSettings(call: PluginCall, settings: T): T {
56
+ settings.numCopies = call.getInt("numberOfCopies", 1)!!
13
57
 
14
58
  when (call.getString("scaleMode")) {
15
- "ActualSize" -> settings.printMode = PrinterInfo.PrintMode.ORIGINAL
16
- "FitPageAspect" -> settings.printMode = PrinterInfo.PrintMode.FIT_TO_PAGE
17
- "FitPaperAspect" -> settings.printMode = PrinterInfo.PrintMode.FIT_TO_PAPER
59
+ "ActualSize" -> settings.scaleMode = PrintImageSettings.ScaleMode.ActualSize
60
+ "FitPageAspect" -> settings.scaleMode = PrintImageSettings.ScaleMode.FitPageAspect
61
+ "FitPaperAspect" -> settings.scaleMode = PrintImageSettings.ScaleMode.FitPaperAspect
18
62
  "ScaleValue" -> {
19
- settings.printMode = PrinterInfo.PrintMode.SCALE
63
+ settings.scaleMode = PrintImageSettings.ScaleMode.ScaleValue
20
64
  if (call.getDouble("scaleValue") !== null) {
21
- settings.scaleValue = call.getDouble("scaleValue")!!
65
+ settings.scaleValue = call.getFloat("scaleValue")!!
22
66
  }
23
67
  }
24
68
  }
25
69
 
26
70
  when (call.getString("halftone")) {
27
71
  "Threshold" -> {
28
- settings.halftone = PrinterInfo.Halftone.THRESHOLD
72
+ settings.halftone = PrintImageSettings.Halftone.Threshold
29
73
  if (call.getDouble("halftoneThreshold") !== null) {
30
- settings.thresholdingValue = call.getInt("halftoneThreshold")!!
74
+ settings.halftoneThreshold = call.getInt("halftoneThreshold")!!
31
75
  }
32
76
  }
33
- "ErrorDiffusion" -> settings.halftone = PrinterInfo.Halftone.ERRORDIFFUSION
34
- "PatternDither" -> settings.halftone = PrinterInfo.Halftone.PATTERNDITHER
77
+ "ErrorDiffusion" -> settings.halftone = PrintImageSettings.Halftone.ErrorDiffusion
78
+ "PatternDither" -> settings.halftone = PrintImageSettings.Halftone.PatternDither
35
79
  }
36
80
 
37
81
  when (call.getString("imageRotation")) {
38
- "Rotate0" -> settings.rotation = PrinterInfo.Rotation.Rotate0
39
- "Rotate90" -> settings.rotation = PrinterInfo.Rotation.Rotate90
40
- "Rotate180" -> settings.rotation = PrinterInfo.Rotation.Rotate180
41
- "Rotate270" -> settings.rotation = PrinterInfo.Rotation.Rotate270
82
+ "Rotate0" -> settings.imageRotation = PrintImageSettings.Rotation.Rotate0
83
+ "Rotate90" -> settings.imageRotation = PrintImageSettings.Rotation.Rotate90
84
+ "Rotate180" -> settings.imageRotation = PrintImageSettings.Rotation.Rotate180
85
+ "Rotate270" -> settings.imageRotation = PrintImageSettings.Rotation.Rotate270
42
86
  }
43
87
 
44
88
  when (call.getString("verticalAlignment")) {
45
- "Top" -> settings.valign = PrinterInfo.VAlign.TOP
46
- "Center" -> settings.valign = PrinterInfo.VAlign.MIDDLE
47
- "Bottom" -> settings.valign = PrinterInfo.VAlign.BOTTOM
89
+ "Top" -> settings.vAlignment = PrintImageSettings.VerticalAlignment.Top
90
+ "Center" -> settings.vAlignment = PrintImageSettings.VerticalAlignment.Center
91
+ "Bottom" -> settings.vAlignment = PrintImageSettings.VerticalAlignment.Bottom
48
92
  }
49
93
 
50
94
  when (call.getString("horizontalAlignment")) {
51
- "Left" -> settings.align = PrinterInfo.Align.LEFT
52
- "Center" -> settings.align = PrinterInfo.Align.CENTER
53
- "Right" -> settings.align = PrinterInfo.Align.RIGHT
95
+ "Left" -> settings.hAlignment = PrintImageSettings.HorizontalAlignment.Left
96
+ "Center" -> settings.hAlignment = PrintImageSettings.HorizontalAlignment.Center
97
+ "Right" -> settings.hAlignment = PrintImageSettings.HorizontalAlignment.Right
54
98
  }
55
99
 
56
100
  // when (call.getString("compressMode")) { }
57
101
 
58
102
  when (call.getString("printQuality")) {
59
- "Best" -> settings.printQuality = PrinterInfo.PrintQuality.HIGH_RESOLUTION
60
- "Fast" -> settings.printQuality = PrinterInfo.PrintQuality.DOUBLE_SPEED
103
+ "Best" -> settings.printQuality = PrintImageSettings.PrintQuality.Best
104
+ "Fast" -> settings.printQuality = PrintImageSettings.PrintQuality.Fast
61
105
  }
62
106
 
63
107
  // when (call.getString("resolution")) { }
package/dist/docs.json CHANGED
@@ -78,13 +78,13 @@
78
78
  ],
79
79
  "returns": "Promise<PluginListenerHandle>",
80
80
  "tags": [],
81
- "docs": "",
81
+ "docs": "Find the printer that can connected to the device.",
82
82
  "complexTypes": [
83
83
  "PluginListenerHandle",
84
84
  "BrotherPrintEventsEnum",
85
85
  "BRLMChannelResult"
86
86
  ],
87
- "slug": "addlistenerbrotherprinteventsenumonprinteravailable"
87
+ "slug": "addlistenerbrotherprinteventsenumonprinteravailable-"
88
88
  },
89
89
  {
90
90
  "name": "addListener",
@@ -103,12 +103,12 @@
103
103
  ],
104
104
  "returns": "Promise<PluginListenerHandle>",
105
105
  "tags": [],
106
- "docs": "",
106
+ "docs": "Success Print Event",
107
107
  "complexTypes": [
108
108
  "PluginListenerHandle",
109
109
  "BrotherPrintEventsEnum"
110
110
  ],
111
- "slug": "addlistenerbrotherprinteventsenumonprint"
111
+ "slug": "addlistenerbrotherprinteventsenumonprint-"
112
112
  },
113
113
  {
114
114
  "name": "addListener",
@@ -127,13 +127,13 @@
127
127
  ],
128
128
  "returns": "Promise<PluginListenerHandle>",
129
129
  "tags": [],
130
- "docs": "",
130
+ "docs": "Failed to connect to the printer.\nex: Bluetooth is off, Printer is off, etc.",
131
131
  "complexTypes": [
132
132
  "PluginListenerHandle",
133
133
  "BrotherPrintEventsEnum",
134
134
  "ErrorInfo"
135
135
  ],
136
- "slug": "addlistenerbrotherprinteventsenumonprintfailedcommunication"
136
+ "slug": "addlistenerbrotherprinteventsenumonprintfailedcommunication-"
137
137
  },
138
138
  {
139
139
  "name": "addListener",
@@ -152,13 +152,13 @@
152
152
  ],
153
153
  "returns": "Promise<PluginListenerHandle>",
154
154
  "tags": [],
155
- "docs": "",
155
+ "docs": "Failed to print.",
156
156
  "complexTypes": [
157
157
  "PluginListenerHandle",
158
158
  "BrotherPrintEventsEnum",
159
159
  "ErrorInfo"
160
160
  ],
161
- "slug": "addlistenerbrotherprinteventsenumonprinterror"
161
+ "slug": "addlistenerbrotherprinteventsenumonprinterror-"
162
162
  }
163
163
  ],
164
164
  "properties": []
@@ -182,6 +182,42 @@
182
182
  }
183
183
  ],
184
184
  "enums": [
185
+ {
186
+ "name": "BRLMPrinterModelName",
187
+ "slug": "brlmprintermodelname",
188
+ "members": [
189
+ {
190
+ "name": "QL_810W",
191
+ "value": "'QL_810W'",
192
+ "tags": [],
193
+ "docs": ""
194
+ },
195
+ {
196
+ "name": "QL_820NWB",
197
+ "value": "'QL_820NWB'",
198
+ "tags": [],
199
+ "docs": ""
200
+ },
201
+ {
202
+ "name": "TD_2320D_203",
203
+ "value": "'TD_2320D_203'",
204
+ "tags": [],
205
+ "docs": ""
206
+ },
207
+ {
208
+ "name": "TD_2030AD",
209
+ "value": "'TD_2030AD'",
210
+ "tags": [],
211
+ "docs": ""
212
+ },
213
+ {
214
+ "name": "TD_2350D_300",
215
+ "value": "'TD_2350D_300'",
216
+ "tags": [],
217
+ "docs": ""
218
+ }
219
+ ]
220
+ },
185
221
  {
186
222
  "name": "BRLMPrinterLabelName",
187
223
  "slug": "brlmprinterlabelname",
@@ -332,42 +368,6 @@
332
368
  }
333
369
  ]
334
370
  },
335
- {
336
- "name": "BRLMPrinterModelName",
337
- "slug": "brlmprintermodelname",
338
- "members": [
339
- {
340
- "name": "QL_810W",
341
- "value": "'QL_810W'",
342
- "tags": [],
343
- "docs": ""
344
- },
345
- {
346
- "name": "QL_820NWB",
347
- "value": "'QL_820NWB'",
348
- "tags": [],
349
- "docs": ""
350
- },
351
- {
352
- "name": "TD_2320D_203",
353
- "value": "'TD_2320D_203'",
354
- "tags": [],
355
- "docs": ""
356
- },
357
- {
358
- "name": "TD_2030AD",
359
- "value": "'TD_2030AD'",
360
- "tags": [],
361
- "docs": ""
362
- },
363
- {
364
- "name": "TD_2350D_203",
365
- "value": "'TD_2350D_203'",
366
- "tags": [],
367
- "docs": ""
368
- }
369
- ]
370
- },
371
371
  {
372
372
  "name": "BRLMPrinterScaleMode",
373
373
  "slug": "brlmprinterscalemode",
@@ -543,24 +543,42 @@
543
543
  ]
544
544
  },
545
545
  {
546
- "name": "BRLMPrinterPrintResolution",
547
- "slug": "brlmprinterprintresolution",
546
+ "name": "BRKMPrinterCustomPaperType",
547
+ "slug": "brkmprintercustompapertype",
548
548
  "members": [
549
549
  {
550
- "name": "Low",
551
- "value": "'Low'",
550
+ "name": "rollPaper",
551
+ "value": "'rollPaper'",
552
552
  "tags": [],
553
553
  "docs": ""
554
554
  },
555
555
  {
556
- "name": "Normal",
557
- "value": "'Normal'",
556
+ "name": "dieCutPaper",
557
+ "value": "'dieCutPaper'",
558
558
  "tags": [],
559
559
  "docs": ""
560
560
  },
561
561
  {
562
- "name": "High",
563
- "value": "'High'",
562
+ "name": "markRollPaper",
563
+ "value": "'markRollPaper'",
564
+ "tags": [],
565
+ "docs": ""
566
+ }
567
+ ]
568
+ },
569
+ {
570
+ "name": "BRKMPrinterCustomPaperUnit",
571
+ "slug": "brkmprintercustompaperunit",
572
+ "members": [
573
+ {
574
+ "name": "mm",
575
+ "value": "'mm'",
576
+ "tags": [],
577
+ "docs": ""
578
+ },
579
+ {
580
+ "name": "inch",
581
+ "value": "'inch'",
564
582
  "tags": [],
565
583
  "docs": ""
566
584
  }
@@ -604,13 +622,13 @@
604
622
  "docs": "",
605
623
  "types": [
606
624
  {
607
- "text": "{\n encodedImage: string;\n\n /**\n * Should use enum BRLMPrinterLabelName\n */\n labelName: BRLMPrinterLabelName;\n\n /**\n * Should use enum BRLMPrinterModelName\n */\n modelName: BRLMPrinterModelName;\n} & Partial<BRLMChannelResult> &\n BRLMPrinterSettings",
625
+ "text": "{\n encodedImage: string;\n\n /**\n * Should use enum BRLMPrinterModelName\n */\n modelName: BRLMPrinterModelName;\n} & Partial<BRLMChannelResult> &\n (BRLMPrinterQLModelSettings | BRLMPrinterTDModelSettings)",
608
626
  "complexTypes": [
609
- "BRLMPrinterLabelName",
610
627
  "BRLMPrinterModelName",
611
628
  "Partial",
612
629
  "BRLMChannelResult",
613
- "BRLMPrinterSettings"
630
+ "BRLMPrinterQLModelSettings",
631
+ "BRLMPrinterTDModelSettings"
614
632
  ]
615
633
  }
616
634
  ]
@@ -635,18 +653,32 @@
635
653
  "docs": "",
636
654
  "types": [
637
655
  {
638
- "text": "{\n port: 'wifi' | 'bluetooth' | 'bluetoothLowEnergy';\n modelName: string;\n serialNumber: string;\n macAddress: string;\n nodeName: string;\n location: string;\n ipAddress: string;\n}",
656
+ "text": "{\n port: 'usb' | 'wifi' | 'bluetooth' | 'bluetoothLowEnergy';\n modelName: string;\n serialNumber: string;\n macAddress: string;\n nodeName: string;\n location: string;\n\n /**\n * This need to connect to the printer.\n * wifi: IP Address\n * bluetooth: macAddress\n * bluetoothLowEnergy: modelName for bluetoothLowEnergy\n */\n channelInfo: string;\n}",
639
657
  "complexTypes": []
640
658
  }
641
659
  ]
642
660
  },
661
+ {
662
+ "name": "BRLMPrinterQLModelSettings",
663
+ "slug": "brlmprinterqlmodelsettings",
664
+ "docs": "",
665
+ "types": [
666
+ {
667
+ "text": "{\n /**\n * Should use enum BRLMPrinterLabelName\n */\n labelName: BRLMPrinterLabelName;\n} & BRLMPrinterSettings",
668
+ "complexTypes": [
669
+ "BRLMPrinterLabelName",
670
+ "BRLMPrinterSettings"
671
+ ]
672
+ }
673
+ ]
674
+ },
643
675
  {
644
676
  "name": "BRLMPrinterSettings",
645
677
  "slug": "brlmprintersettings",
646
678
  "docs": "These are optional. If these are not set, default values are assigned by the printer.",
647
679
  "types": [
648
680
  {
649
- "text": "{\n /**\n * The number of copies you print.\n */\n numberOfCopies?: BRLMPrinterNumberOfCopies;\n\n /**\n * Whether the auto-cut is enabled or not. If true, your printer cut the paper each page.\n */\n autoCut?: BRLMPrinterAutoCutType;\n\n /**\n * A scale mode that specifies how your data is scaled in a print area of your printer.\n */\n scaleMode?: BRLMPrinterScaleMode;\n\n /**\n * A scale value. This is effective when ScaleMode is ScaleValue.\n */\n scaleValue?: BRLMPrinterScaleValueType;\n\n /**\n * A way to rasterize your data.\n */\n halftone?: BRLMPrinterHalftone;\n\n /**\n * A threshold value. This is effective when the Halftone is Threshold.\n */\n halftoneThreshold?: BRLMPrinterHalftoneThresholdType;\n\n /**\n * An image rotation that specifies the angle in which your data is placed in the print area. Rotation direction is clockwise.\n */\n imageRotation?: BRLMPrinterImageRotation;\n\n /**\n * A vertical alignment that specifies how your data is placed in the printable area.\n */\n verticalAlignment?: BRLMPrinterVerticalAlignment;\n\n /**\n * A horizontal alignment that specifies how your data is placed in the printable area.\n */\n horizontalAlignment?: BRLMPrinterHorizontalAlignment;\n\n /**\n * A compress mode that specifies how to compress your data.\n * note: This is ios only.\n */\n compressMode?: BRLMPrinterCompressMode;\n\n /**\n * A priority that is print speed or print quality. Whether or not this has an effect is depend on your printer.\n */\n printQuality?: BRLMPrinterPrintQuality;\n\n /**\n * A priority that is print speed or print quality. Whether or not this has an effect is depend on your printer.\n * note: This is ios only.\n */\n resolution?: BRLMPrinterPrintResolution;\n}",
681
+ "text": "{\n /**\n * The number of copies you print.\n */\n numberOfCopies?: BRLMPrinterNumberOfCopies;\n\n /**\n * Whether the auto-cut is enabled or not. If true, your printer cut the paper each page.\n */\n autoCut?: BRLMPrinterAutoCutType;\n\n /**\n * A scale mode that specifies how your data is scaled in a print area of your printer.\n */\n scaleMode?: BRLMPrinterScaleMode;\n\n /**\n * A scale value. This is effective when ScaleMode is ScaleValue.\n */\n scaleValue?: BRLMPrinterScaleValueType;\n\n /**\n * A way to rasterize your data.\n */\n halftone?: BRLMPrinterHalftone;\n\n /**\n * A threshold value. This is effective when the Halftone is Threshold.\n */\n halftoneThreshold?: BRLMPrinterHalftoneThresholdType;\n\n /**\n * An image rotation that specifies the angle in which your data is placed in the print area. Rotation direction is clockwise.\n */\n imageRotation?: BRLMPrinterImageRotation;\n\n /**\n * A vertical alignment that specifies how your data is placed in the printable area.\n */\n verticalAlignment?: BRLMPrinterVerticalAlignment;\n\n /**\n * A horizontal alignment that specifies how your data is placed in the printable area.\n */\n horizontalAlignment?: BRLMPrinterHorizontalAlignment;\n\n /**\n * A compress mode that specifies how to compress your data.\n * note: This is ios only.\n */\n compressMode?: BRLMPrinterCompressMode;\n\n /**\n * A priority that is print speed or print quality. Whether or not this has an effect is depend on your printer.\n */\n printQuality?: BRLMPrinterPrintQuality;\n}",
650
682
  "complexTypes": [
651
683
  "BRLMPrinterNumberOfCopies",
652
684
  "BRLMPrinterAutoCutType",
@@ -658,8 +690,7 @@
658
690
  "BRLMPrinterVerticalAlignment",
659
691
  "BRLMPrinterHorizontalAlignment",
660
692
  "BRLMPrinterCompressMode",
661
- "BRLMPrinterPrintQuality",
662
- "BRLMPrinterPrintResolution"
693
+ "BRLMPrinterPrintQuality"
663
694
  ]
664
695
  }
665
696
  ]
@@ -708,13 +739,27 @@
708
739
  }
709
740
  ]
710
741
  },
742
+ {
743
+ "name": "BRLMPrinterTDModelSettings",
744
+ "slug": "brlmprintertdmodelsettings",
745
+ "docs": "",
746
+ "types": [
747
+ {
748
+ "text": "{\n /**\n * Should use enum BRKMPrinterCustomPaperType\n */\n paperType: BRKMPrinterCustomPaperType;\n\n /**\n * The width of the label. For example, the RD-U04J1 is 60.0 wide.\n */\n tapeWidth: number;\n\n /**\n * The length of the label. For example, the RD-U04J1 is 60.0 wide.\n */\n tapeLength: number;\n\n /**\n * It is the difference between a sticker and a mount.\n * For example, the RD-U04J1 is `1.0, 2.0, 1.0, 2.0`\n */\n marginTop: number;\n marginRight: number;\n marginBottom: number;\n marginLeft: number;\n\n /**\n * The spacing between seals. For example, the RD-U04J1 is 0.2.\n */\n gapLength: number;\n\n paperMarkPosition: number;\n paperMarkLength: number;\n\n /**\n * Should use enum BRKMPrinterCustomPaperUnit.\n * For example, the RD-U04J1 is mm.\n */\n paperUnit: BRKMPrinterCustomPaperUnit;\n}",
749
+ "complexTypes": [
750
+ "BRKMPrinterCustomPaperType",
751
+ "BRKMPrinterCustomPaperUnit"
752
+ ]
753
+ }
754
+ ]
755
+ },
711
756
  {
712
757
  "name": "BRLMSearchOption",
713
758
  "slug": "brlmsearchoption",
714
759
  "docs": "",
715
760
  "types": [
716
761
  {
717
- "text": "{\n port: 'wifi' | 'bluetooth' | 'bluetoothLowEnergy';\n /**\n * searchDuration is the time to end search for devices.\n * default is 15 seconds.\n * use only port is 'wifi' or 'bluetoothLowEnergy'.\n */\n searchDuration: number;\n}",
762
+ "text": "{\n /**\n * 'usb' is android only, and now developing.\n */\n port: 'usb' | 'wifi' | 'bluetooth' | 'bluetoothLowEnergy';\n\n /**\n * searchDuration is the time to end search for devices.\n * default is 15 seconds.\n * use only port is 'wifi' or 'bluetoothLowEnergy'.\n */\n searchDuration: number;\n}",
718
763
  "complexTypes": []
719
764
  }
720
765
  ]
@@ -4,6 +4,15 @@
4
4
  *
5
5
  * And name is follow android naming convention.
6
6
  */
7
+ export declare enum BRKMPrinterCustomPaperUnit {
8
+ mm = "mm",
9
+ inch = "inch"
10
+ }
11
+ export declare enum BRKMPrinterCustomPaperType {
12
+ rollPaper = "rollPaper",
13
+ dieCutPaper = "dieCutPaper",
14
+ markRollPaper = "markRollPaper"
15
+ }
7
16
  /**
8
17
  * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html
9
18
  */
@@ -12,7 +21,7 @@ export declare enum BRLMPrinterModelName {
12
21
  QL_820NWB = "QL_820NWB",
13
22
  TD_2320D_203 = "TD_2320D_203",
14
23
  TD_2030AD = "TD_2030AD",
15
- TD_2350D_203 = "TD_2350D_203"
24
+ TD_2350D_300 = "TD_2350D_300"
16
25
  }
17
26
  /**
18
27
  * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html
@@ -107,8 +116,3 @@ export declare enum BRLMPrinterPrintQuality {
107
116
  /**
108
117
  * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution
109
118
  */
110
- export declare enum BRLMPrinterPrintResolution {
111
- Low = "Low",
112
- Normal = "Normal",
113
- High = "High"
114
- }
@@ -4,6 +4,17 @@
4
4
  *
5
5
  * And name is follow android naming convention.
6
6
  */
7
+ export var BRKMPrinterCustomPaperUnit;
8
+ (function (BRKMPrinterCustomPaperUnit) {
9
+ BRKMPrinterCustomPaperUnit["mm"] = "mm";
10
+ BRKMPrinterCustomPaperUnit["inch"] = "inch";
11
+ })(BRKMPrinterCustomPaperUnit || (BRKMPrinterCustomPaperUnit = {}));
12
+ export var BRKMPrinterCustomPaperType;
13
+ (function (BRKMPrinterCustomPaperType) {
14
+ BRKMPrinterCustomPaperType["rollPaper"] = "rollPaper";
15
+ BRKMPrinterCustomPaperType["dieCutPaper"] = "dieCutPaper";
16
+ BRKMPrinterCustomPaperType["markRollPaper"] = "markRollPaper";
17
+ })(BRKMPrinterCustomPaperType || (BRKMPrinterCustomPaperType = {}));
7
18
  /**
8
19
  * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html
9
20
  */
@@ -13,7 +24,7 @@ export var BRLMPrinterModelName;
13
24
  BRLMPrinterModelName["QL_820NWB"] = "QL_820NWB";
14
25
  BRLMPrinterModelName["TD_2320D_203"] = "TD_2320D_203";
15
26
  BRLMPrinterModelName["TD_2030AD"] = "TD_2030AD";
16
- BRLMPrinterModelName["TD_2350D_203"] = "TD_2350D_203";
27
+ BRLMPrinterModelName["TD_2350D_300"] = "TD_2350D_300";
17
28
  })(BRLMPrinterModelName || (BRLMPrinterModelName = {}));
18
29
  /**
19
30
  * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html
@@ -112,10 +123,9 @@ export var BRLMPrinterPrintQuality;
112
123
  /**
113
124
  * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution
114
125
  */
115
- export var BRLMPrinterPrintResolution;
116
- (function (BRLMPrinterPrintResolution) {
117
- BRLMPrinterPrintResolution["Low"] = "Low";
118
- BRLMPrinterPrintResolution["Normal"] = "Normal";
119
- BRLMPrinterPrintResolution["High"] = "High";
120
- })(BRLMPrinterPrintResolution || (BRLMPrinterPrintResolution = {}));
126
+ // export enum BRLMPrinterPrintResolution {
127
+ // Low = 'Low',
128
+ // Normal = 'Normal',
129
+ // High = 'High',
130
+ // }
121
131
  //# sourceMappingURL=brother-printer.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"brother-printer.enum.js","sourceRoot":"","sources":["../../src/brother-printer.enum.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;IACnB,+CAAuB,CAAA;IACvB,qDAA6B,CAAA;IAC7B,+CAAuB,CAAA;IACvB,qDAA6B,CAAA;AAC/B,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,oBAyBX;AAzBD,WAAY,oBAAoB;IAC9B,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,2CAAmB,CAAA;IACnB,mCAAW,CAAA;IACX,mCAAW,CAAA;IACX,mCAAW,CAAA;IACX,mCAAW,CAAA;IACX,mCAAW,CAAA;IACX,mCAAW,CAAA;IACX,yCAAiB,CAAA;IACjB,uCAAe,CAAA;IACf,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;AACnB,CAAC,EAzBW,oBAAoB,KAApB,oBAAoB,QAyB/B;AAOD;;GAEG;AACH,MAAM,CAAN,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,iDAAqB,CAAA;IACrB,mDAAuB,CAAA;IACvB,mDAAuB,CAAA;AACzB,CAAC,EALW,wBAAwB,KAAxB,wBAAwB,QAKnC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,iDAAyB,CAAA;IACzB,uDAA+B,CAAA;IAC/B,yDAAiC,CAAA;IACjC,iDAAyB,CAAA;AAC3B,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,wDAAiC,CAAA;IACjC,sDAA+B,CAAA;AACjC,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,4BAIX;AAJD,WAAY,4BAA4B;IACtC,2CAAW,CAAA;IACX,iDAAiB,CAAA;IACjB,iDAAiB,CAAA;AACnB,CAAC,EAJW,4BAA4B,KAA5B,4BAA4B,QAIvC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,8BAIX;AAJD,WAAY,8BAA8B;IACxC,+CAAa,CAAA;IACb,mDAAiB,CAAA;IACjB,iDAAe,CAAA;AACjB,CAAC,EAJW,8BAA8B,KAA9B,8BAA8B,QAIzC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,wCAAa,CAAA;IACb,wCAAa,CAAA;IACb,0CAAe,CAAA;AACjB,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,wCAAa,CAAA;IACb,wCAAa,CAAA;AACf,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,yCAAW,CAAA;IACX,+CAAiB,CAAA;IACjB,2CAAa,CAAA;AACf,CAAC,EAJW,0BAA0B,KAA1B,0BAA0B,QAIrC","sourcesContent":["/**\n * Note: If you update this file, you should update the following files:\n * - ios/Plugin/Model/PrinterModel.swift\n *\n * And name is follow android naming convention.\n */\n\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html\n */\nexport enum BRLMPrinterModelName {\n QL_810W = 'QL_810W',\n QL_820NWB = 'QL_820NWB',\n TD_2320D_203 = 'TD_2320D_203',\n TD_2030AD = 'TD_2030AD',\n TD_2350D_203 = 'TD_2350D_203',\n}\n\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html\n */\nexport enum BRLMPrinterLabelName {\n W17H54 = 'W17H54',\n W17H87 = 'W17H87',\n W23H23 = 'W23H23',\n W29H42 = 'W29H42',\n W29H90 = 'W29H90',\n W38H90 = 'W38H90',\n W39H48 = 'W39H48',\n W52H29 = 'W52H29',\n W62H29 = 'W62H29',\n W62H100 = 'W62H100',\n W12 = 'W12',\n W29 = 'W29',\n W38 = 'W38',\n W50 = 'W50',\n W54 = 'W54',\n W62 = 'W62',\n W60H86 = 'W60H86',\n W62RB = 'W62RB',\n W54H29 = 'W54H29',\n W12DIA = 'W12DIA',\n W24DIA = 'W24DIA',\n W58DIA = 'W58DIA',\n W62H60 = 'W62H60',\n W62H75 = 'W62H75',\n}\n\nexport type BRLMPrinterAutoCutType = boolean;\nexport type BRLMPrinterScaleValueType = number;\nexport type BRLMPrinterHalftoneThresholdType = number;\nexport type BRLMPrinterNumberOfCopies = number;\n\n/**\n * @url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#imagerotation\n */\nexport enum BRLMPrinterImageRotation {\n Rotate0 = 'Rotate0',\n Rotate90 = 'Rotate90',\n Rotate180 = 'Rotate180',\n Rotate270 = 'Rotate270',\n}\n\n/**\n * url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#scalemode\n */\nexport enum BRLMPrinterScaleMode {\n ActualSize = 'ActualSize',\n FitPageAspect = 'FitPageAspect',\n FitPaperAspect = 'FitPaperAspect',\n ScaleValue = 'ScaleValue',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#halftone\n */\nexport enum BRLMPrinterHalftone {\n Threshold = 'Threshold',\n ErrorDiffusion = 'ErrorDiffusion',\n PatternDither = 'PatternDither',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#verticalalignment\n */\nexport enum BRLMPrinterVerticalAlignment {\n Top = 'Top',\n Center = 'Center',\n Bottom = 'Bottom',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#horizontalalignment\n */\nexport enum BRLMPrinterHorizontalAlignment {\n Left = 'Left',\n Center = 'Center',\n Right = 'Right',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#compressmode\n */\nexport enum BRLMPrinterCompressMode {\n None = 'None',\n Tiff = 'Tiff',\n Mode9 = 'Mode9',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#printquality\n */\nexport enum BRLMPrinterPrintQuality {\n Best = 'Best',\n Fast = 'Fast',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution\n */\nexport enum BRLMPrinterPrintResolution {\n Low = 'Low',\n Normal = 'Normal',\n High = 'High',\n}\n"]}
1
+ {"version":3,"file":"brother-printer.enum.js","sourceRoot":"","sources":["../../src/brother-printer.enum.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Note: If you update this file, you should update the following files:\n * - ios/Plugin/Model/PrinterModel.swift\n *\n * And name is follow android naming convention.\n */\n\nexport enum BRKMPrinterCustomPaperUnit {\n mm = 'mm',\n inch = 'inch',\n}\n\nexport enum BRKMPrinterCustomPaperType {\n rollPaper = 'rollPaper',\n dieCutPaper = 'dieCutPaper',\n markRollPaper = 'markRollPaper',\n}\n\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html\n */\nexport enum BRLMPrinterModelName {\n QL_810W = 'QL_810W',\n QL_820NWB = 'QL_820NWB',\n TD_2320D_203 = 'TD_2320D_203',\n TD_2030AD = 'TD_2030AD',\n TD_2350D_300 = 'TD_2350D_300',\n}\n\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html\n */\nexport enum BRLMPrinterLabelName {\n W17H54 = 'W17H54',\n W17H87 = 'W17H87',\n W23H23 = 'W23H23',\n W29H42 = 'W29H42',\n W29H90 = 'W29H90',\n W38H90 = 'W38H90',\n W39H48 = 'W39H48',\n W52H29 = 'W52H29',\n W62H29 = 'W62H29',\n W62H100 = 'W62H100',\n W12 = 'W12',\n W29 = 'W29',\n W38 = 'W38',\n W50 = 'W50',\n W54 = 'W54',\n W62 = 'W62',\n W60H86 = 'W60H86',\n W62RB = 'W62RB',\n W54H29 = 'W54H29',\n W12DIA = 'W12DIA',\n W24DIA = 'W24DIA',\n W58DIA = 'W58DIA',\n W62H60 = 'W62H60',\n W62H75 = 'W62H75',\n}\n\nexport type BRLMPrinterAutoCutType = boolean;\nexport type BRLMPrinterScaleValueType = number;\nexport type BRLMPrinterHalftoneThresholdType = number;\nexport type BRLMPrinterNumberOfCopies = number;\n\n/**\n * @url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#imagerotation\n */\nexport enum BRLMPrinterImageRotation {\n Rotate0 = 'Rotate0',\n Rotate90 = 'Rotate90',\n Rotate180 = 'Rotate180',\n Rotate270 = 'Rotate270',\n}\n\n/**\n * url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#scalemode\n */\nexport enum BRLMPrinterScaleMode {\n ActualSize = 'ActualSize',\n FitPageAspect = 'FitPageAspect',\n FitPaperAspect = 'FitPaperAspect',\n ScaleValue = 'ScaleValue',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#halftone\n */\nexport enum BRLMPrinterHalftone {\n Threshold = 'Threshold',\n ErrorDiffusion = 'ErrorDiffusion',\n PatternDither = 'PatternDither',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#verticalalignment\n */\nexport enum BRLMPrinterVerticalAlignment {\n Top = 'Top',\n Center = 'Center',\n Bottom = 'Bottom',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#horizontalalignment\n */\nexport enum BRLMPrinterHorizontalAlignment {\n Left = 'Left',\n Center = 'Center',\n Right = 'Right',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#compressmode\n */\nexport enum BRLMPrinterCompressMode {\n None = 'None',\n Tiff = 'Tiff',\n Mode9 = 'Mode9',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#printquality\n */\nexport enum BRLMPrinterPrintQuality {\n Best = 'Best',\n Fast = 'Fast',\n}\n\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution\n */\n// export enum BRLMPrinterPrintResolution {\n// Low = 'Low',\n// Normal = 'Normal',\n// High = 'High',\n// }\n"]}
@@ -1,26 +1,67 @@
1
1
  import type { PluginListenerHandle } from '@capacitor/core';
2
- import type { BRLMPrinterLabelName, BRLMPrinterModelName, BRLMPrinterAutoCutType, BRLMPrinterCompressMode, BRLMPrinterHalftone, BRLMPrinterHalftoneThresholdType, BRLMPrinterHorizontalAlignment, BRLMPrinterNumberOfCopies, BRLMPrinterPrintQuality, BRLMPrinterPrintResolution, BRLMPrinterImageRotation, BRLMPrinterScaleMode, BRLMPrinterScaleValueType, BRLMPrinterVerticalAlignment } from './brother-printer.enum';
2
+ import type { BRLMPrinterLabelName, BRLMPrinterModelName, BRLMPrinterAutoCutType, BRLMPrinterCompressMode, BRLMPrinterHalftone, BRLMPrinterHalftoneThresholdType, BRLMPrinterHorizontalAlignment, BRLMPrinterNumberOfCopies, BRLMPrinterPrintQuality, BRLMPrinterImageRotation, BRLMPrinterScaleMode, BRLMPrinterScaleValueType, BRLMPrinterVerticalAlignment, BRKMPrinterCustomPaperType, BRKMPrinterCustomPaperUnit } from './brother-printer.enum';
3
3
  import type { BrotherPrintEventsEnum } from './events.enum';
4
4
  export declare type BRLMChannelResult = {
5
- port: 'wifi' | 'bluetooth' | 'bluetoothLowEnergy';
5
+ port: 'usb' | 'wifi' | 'bluetooth' | 'bluetoothLowEnergy';
6
6
  modelName: string;
7
7
  serialNumber: string;
8
8
  macAddress: string;
9
9
  nodeName: string;
10
10
  location: string;
11
- ipAddress: string;
11
+ /**
12
+ * This need to connect to the printer.
13
+ * wifi: IP Address
14
+ * bluetooth: macAddress
15
+ * bluetoothLowEnergy: modelName for bluetoothLowEnergy
16
+ */
17
+ channelInfo: string;
12
18
  };
13
19
  export declare type BRLMPrintOptions = {
14
20
  encodedImage: string;
15
- /**
16
- * Should use enum BRLMPrinterLabelName
17
- */
18
- labelName: BRLMPrinterLabelName;
19
21
  /**
20
22
  * Should use enum BRLMPrinterModelName
21
23
  */
22
24
  modelName: BRLMPrinterModelName;
23
- } & Partial<BRLMChannelResult> & BRLMPrinterSettings;
25
+ } & Partial<BRLMChannelResult> & (BRLMPrinterQLModelSettings | BRLMPrinterTDModelSettings);
26
+ export declare type BRLMPrinterTDModelSettings = {
27
+ /**
28
+ * Should use enum BRKMPrinterCustomPaperType
29
+ */
30
+ paperType: BRKMPrinterCustomPaperType;
31
+ /**
32
+ * The width of the label. For example, the RD-U04J1 is 60.0 wide.
33
+ */
34
+ tapeWidth: number;
35
+ /**
36
+ * The length of the label. For example, the RD-U04J1 is 60.0 wide.
37
+ */
38
+ tapeLength: number;
39
+ /**
40
+ * It is the difference between a sticker and a mount.
41
+ * For example, the RD-U04J1 is `1.0, 2.0, 1.0, 2.0`
42
+ */
43
+ marginTop: number;
44
+ marginRight: number;
45
+ marginBottom: number;
46
+ marginLeft: number;
47
+ /**
48
+ * The spacing between seals. For example, the RD-U04J1 is 0.2.
49
+ */
50
+ gapLength: number;
51
+ paperMarkPosition: number;
52
+ paperMarkLength: number;
53
+ /**
54
+ * Should use enum BRKMPrinterCustomPaperUnit.
55
+ * For example, the RD-U04J1 is mm.
56
+ */
57
+ paperUnit: BRKMPrinterCustomPaperUnit;
58
+ };
59
+ export declare type BRLMPrinterQLModelSettings = {
60
+ /**
61
+ * Should use enum BRLMPrinterLabelName
62
+ */
63
+ labelName: BRLMPrinterLabelName;
64
+ } & BRLMPrinterSettings;
24
65
  /**
25
66
  * These are optional. If these are not set, default values are assigned by the printer.
26
67
  */
@@ -70,14 +111,12 @@ export declare type BRLMPrinterSettings = {
70
111
  * A priority that is print speed or print quality. Whether or not this has an effect is depend on your printer.
71
112
  */
72
113
  printQuality?: BRLMPrinterPrintQuality;
73
- /**
74
- * A priority that is print speed or print quality. Whether or not this has an effect is depend on your printer.
75
- * note: This is ios only.
76
- */
77
- resolution?: BRLMPrinterPrintResolution;
78
114
  };
79
115
  export declare type BRLMSearchOption = {
80
- port: 'wifi' | 'bluetooth' | 'bluetoothLowEnergy';
116
+ /**
117
+ * 'usb' is android only, and now developing.
118
+ */
119
+ port: 'usb' | 'wifi' | 'bluetooth' | 'bluetoothLowEnergy';
81
120
  /**
82
121
  * searchDuration is the time to end search for devices.
83
122
  * default is 15 seconds.
@@ -103,8 +142,21 @@ export interface BrotherPrintPlugin {
103
142
  * Basically, it times out, so there is no need to use it. Use it when you want to run multiple connectType searches at the same time and time out any of them manually.
104
143
  */
105
144
  cancelSearchBluetoothPrinter(): Promise<void>;
145
+ /**
146
+ * Find the printer that can connected to the device.
147
+ */
106
148
  addListener(eventName: BrotherPrintEventsEnum.onPrinterAvailable, listenerFunc: (printers: BRLMChannelResult) => void): Promise<PluginListenerHandle>;
149
+ /**
150
+ * Success Print Event
151
+ */
107
152
  addListener(eventName: BrotherPrintEventsEnum.onPrint, listenerFunc: () => void): Promise<PluginListenerHandle>;
153
+ /**
154
+ * Failed to connect to the printer.
155
+ * ex: Bluetooth is off, Printer is off, etc.
156
+ */
108
157
  addListener(eventName: BrotherPrintEventsEnum.onPrintFailedCommunication, listenerFunc: (info: ErrorInfo) => void): Promise<PluginListenerHandle>;
158
+ /**
159
+ * Failed to print.
160
+ */
109
161
  addListener(eventName: BrotherPrintEventsEnum.onPrintError, listenerFunc: (info: ErrorInfo) => void): Promise<PluginListenerHandle>;
110
162
  }