@rdlabo/capacitor-brotherprint 6.2.0-0 → 6.2.0-2
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.
- package/README.md +116 -3
- package/android/src/main/java/jp/rdlabo/capacitor/plugin/brotherprint/BrotherPrint.kt +6 -20
- package/android/src/main/java/jp/rdlabo/capacitor/plugin/brotherprint/models/BrotherPrintEvent.kt +1 -1
- package/android/src/main/java/jp/rdlabo/capacitor/plugin/brotherprint/models/BrotherPrintSettings.kt +67 -0
- package/dist/docs.json +290 -7
- package/dist/esm/brother-printer.enum.d.ts +69 -0
- package/dist/esm/brother-printer.enum.js +73 -0
- package/dist/esm/brother-printer.enum.js.map +1 -1
- package/dist/esm/definitions.d.ts +57 -23
- package/dist/esm/definitions.js.map +1 -1
- package/dist/plugin.cjs.js +73 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +73 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/Model/PrinterModel.swift +6 -6
- package/ios/Plugin/Model/PrinterSettingsModel.swift +122 -0
- package/ios/Plugin/Plugin.swift +2 -7
- package/ios/Plugin.xcworkspace/xcuserdata/sakakibara.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,6 +28,10 @@ Amazon Affiliate Links: **https://amzn.to/3AiiOFT**
|
|
|
28
28
|
|
|
29
29
|
※1 The iOS/BT implementation for the QL-820NWBc is in place, but it’s uncertain if it functions correctly. It’s unclear whether this is an implementation issue, as Brother’s official app also doesn’t work well.
|
|
30
30
|
|
|
31
|
+
### Note
|
|
32
|
+
|
|
33
|
+
iOS `BRLMQLPrintSettingsLabelSize.dieCutW29H90` may work as `BRLMQLPrintSettingsLabelSize.dieCutW29H42`.
|
|
34
|
+
|
|
31
35
|
## How to install
|
|
32
36
|
|
|
33
37
|
```
|
|
@@ -73,6 +77,8 @@ Update the `ios/App/Podfile` file at your project. https://github.com/BernardRad
|
|
|
73
77
|
end
|
|
74
78
|
```
|
|
75
79
|
|
|
80
|
+
After set, run `pod update` in the `ios` directory.
|
|
81
|
+
|
|
76
82
|
## Permission configuration
|
|
77
83
|
|
|
78
84
|
### Android configuration
|
|
@@ -367,12 +373,14 @@ addListener(eventName: BrotherPrintEventsEnum.onPrintError, listenerFunc: (info:
|
|
|
367
373
|
|
|
368
374
|
#### BRLMPrintOptions
|
|
369
375
|
|
|
370
|
-
<code>{ encodedImage: string;
|
|
376
|
+
<code>{ encodedImage: string; /** * Should use enum <a href="#brlmprinterlabelname">BRLMPrinterLabelName</a> */ labelName: <a href="#brlmprinterlabelname">BRLMPrinterLabelName</a>; /** * Should use enum <a href="#brlmprintermodelname">BRLMPrinterModelName</a> */ modelName: <a href="#brlmprintermodelname">BRLMPrinterModelName</a>; } & <a href="#partial">Partial</a><<a href="#brlmchannelresult">BRLMChannelResult</a>> & <a href="#brlmprintersettings">BRLMPrinterSettings</a></code>
|
|
371
377
|
|
|
372
378
|
|
|
373
|
-
####
|
|
379
|
+
#### Partial
|
|
374
380
|
|
|
375
|
-
|
|
381
|
+
Make all properties in T optional
|
|
382
|
+
|
|
383
|
+
<code>{
|
|
376
384
|
[P in keyof T]?: T[P];
|
|
377
385
|
}</code>
|
|
378
386
|
|
|
379
387
|
|
|
380
388
|
#### BRLMChannelResult
|
|
@@ -380,6 +388,38 @@ addListener(eventName: BrotherPrintEventsEnum.onPrintError, listenerFunc: (info:
|
|
|
380
388
|
<code>{ port: 'wifi' | 'bluetooth' | 'bluetoothLowEnergy'; modelName: string; serialNumber: string; macAddress: string; nodeName: string; location: string; ipAddress: string; }</code>
|
|
381
389
|
|
|
382
390
|
|
|
391
|
+
#### BRLMPrinterSettings
|
|
392
|
+
|
|
393
|
+
These are optional. If these are not set, default values are assigned by the printer.
|
|
394
|
+
|
|
395
|
+
<code>{ /** * The number of copies you print. */ numberOfCopies?: <a href="#brlmprinternumberofcopies">BRLMPrinterNumberOfCopies</a>; /** * Whether the auto-cut is enabled or not. If true, your printer cut the paper each page. */ autoCut?: <a href="#brlmprinterautocuttype">BRLMPrinterAutoCutType</a>; /** * A scale mode that specifies how your data is scaled in a print area of your printer. */ scaleMode?: <a href="#brlmprinterscalemode">BRLMPrinterScaleMode</a>; /** * A scale value. This is effective when ScaleMode is ScaleValue. */ scaleValue?: <a href="#brlmprinterscalevaluetype">BRLMPrinterScaleValueType</a>; /** * A way to rasterize your data. */ halftone?: <a href="#brlmprinterhalftone">BRLMPrinterHalftone</a>; /** * A threshold value. This is effective when the Halftone is Threshold. */ halftoneThreshold?: <a href="#brlmprinterhalftonethresholdtype">BRLMPrinterHalftoneThresholdType</a>; /** * An image rotation that specifies the angle in which your data is placed in the print area. Rotation direction is clockwise. */ imageRotation?: <a href="#brlmprinterimagerotation">BRLMPrinterImageRotation</a>; /** * A vertical alignment that specifies how your data is placed in the printable area. */ verticalAlignment?: <a href="#brlmprinterverticalalignment">BRLMPrinterVerticalAlignment</a>; /** * A horizontal alignment that specifies how your data is placed in the printable area. */ horizontalAlignment?: <a href="#brlmprinterhorizontalalignment">BRLMPrinterHorizontalAlignment</a>; /** * A compress mode that specifies how to compress your data. * note: This is ios only. */ compressMode?: <a href="#brlmprintercompressmode">BRLMPrinterCompressMode</a>; /** * A priority that is print speed or print quality. Whether or not this has an effect is depend on your printer. */ printQuality?: <a href="#brlmprinterprintquality">BRLMPrinterPrintQuality</a>; /** * A priority that is print speed or print quality. Whether or not this has an effect is depend on your printer. * note: This is ios only. */ resolution?: <a href="#brlmprinterprintresolution">BRLMPrinterPrintResolution</a>; }</code>
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
#### BRLMPrinterNumberOfCopies
|
|
399
|
+
|
|
400
|
+
<code>number</code>
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
#### BRLMPrinterAutoCutType
|
|
404
|
+
|
|
405
|
+
<code>boolean</code>
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
#### BRLMPrinterScaleValueType
|
|
409
|
+
|
|
410
|
+
<code>number</code>
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
#### BRLMPrinterHalftoneThresholdType
|
|
414
|
+
|
|
415
|
+
<code>number</code>
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
#### BRLMSearchOption
|
|
419
|
+
|
|
420
|
+
<code>{ port: 'wifi' | 'bluetooth' | 'bluetoothLowEnergy'; /** * searchDuration is the time to end search for devices. * default is 15 seconds. * use only port is 'wifi' or 'bluetoothLowEnergy'. */ searchDuration: number; }</code>
|
|
421
|
+
|
|
422
|
+
|
|
383
423
|
#### ErrorInfo
|
|
384
424
|
|
|
385
425
|
<code>{ message: string; code: number; }</code>
|
|
@@ -429,6 +469,79 @@ addListener(eventName: BrotherPrintEventsEnum.onPrintError, listenerFunc: (info:
|
|
|
429
469
|
| **`TD_2350D_203`** | <code>'TD_2350D_203'</code> |
|
|
430
470
|
|
|
431
471
|
|
|
472
|
+
#### BRLMPrinterScaleMode
|
|
473
|
+
|
|
474
|
+
| Members | Value |
|
|
475
|
+
| -------------------- | ----------------------------- |
|
|
476
|
+
| **`ActualSize`** | <code>'ActualSize'</code> |
|
|
477
|
+
| **`FitPageAspect`** | <code>'FitPageAspect'</code> |
|
|
478
|
+
| **`FitPaperAspect`** | <code>'FitPaperAspect'</code> |
|
|
479
|
+
| **`ScaleValue`** | <code>'ScaleValue'</code> |
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
#### BRLMPrinterHalftone
|
|
483
|
+
|
|
484
|
+
| Members | Value |
|
|
485
|
+
| -------------------- | ----------------------------- |
|
|
486
|
+
| **`Threshold`** | <code>'Threshold'</code> |
|
|
487
|
+
| **`ErrorDiffusion`** | <code>'ErrorDiffusion'</code> |
|
|
488
|
+
| **`PatternDither`** | <code>'PatternDither'</code> |
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
#### BRLMPrinterImageRotation
|
|
492
|
+
|
|
493
|
+
| Members | Value |
|
|
494
|
+
| --------------- | ------------------------ |
|
|
495
|
+
| **`Rotate0`** | <code>'Rotate0'</code> |
|
|
496
|
+
| **`Rotate90`** | <code>'Rotate90'</code> |
|
|
497
|
+
| **`Rotate180`** | <code>'Rotate180'</code> |
|
|
498
|
+
| **`Rotate270`** | <code>'Rotate270'</code> |
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
#### BRLMPrinterVerticalAlignment
|
|
502
|
+
|
|
503
|
+
| Members | Value |
|
|
504
|
+
| ------------ | --------------------- |
|
|
505
|
+
| **`Top`** | <code>'Top'</code> |
|
|
506
|
+
| **`Center`** | <code>'Center'</code> |
|
|
507
|
+
| **`Bottom`** | <code>'Bottom'</code> |
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
#### BRLMPrinterHorizontalAlignment
|
|
511
|
+
|
|
512
|
+
| Members | Value |
|
|
513
|
+
| ------------ | --------------------- |
|
|
514
|
+
| **`Left`** | <code>'Left'</code> |
|
|
515
|
+
| **`Center`** | <code>'Center'</code> |
|
|
516
|
+
| **`Right`** | <code>'Right'</code> |
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
#### BRLMPrinterCompressMode
|
|
520
|
+
|
|
521
|
+
| Members | Value |
|
|
522
|
+
| ----------- | -------------------- |
|
|
523
|
+
| **`None`** | <code>'None'</code> |
|
|
524
|
+
| **`Tiff`** | <code>'Tiff'</code> |
|
|
525
|
+
| **`Mode9`** | <code>'Mode9'</code> |
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
#### BRLMPrinterPrintQuality
|
|
529
|
+
|
|
530
|
+
| Members | Value |
|
|
531
|
+
| ---------- | ------------------- |
|
|
532
|
+
| **`Best`** | <code>'Best'</code> |
|
|
533
|
+
| **`Fast`** | <code>'Fast'</code> |
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
#### BRLMPrinterPrintResolution
|
|
537
|
+
|
|
538
|
+
| Members | Value |
|
|
539
|
+
| ------------ | --------------------- |
|
|
540
|
+
| **`Low`** | <code>'Low'</code> |
|
|
541
|
+
| **`Normal`** | <code>'Normal'</code> |
|
|
542
|
+
| **`High`** | <code>'High'</code> |
|
|
543
|
+
|
|
544
|
+
|
|
432
545
|
#### BrotherPrintEventsEnum
|
|
433
546
|
|
|
434
547
|
| Members | Value |
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
package jp.rdlabo.capacitor.plugin.brotherprint
|
|
2
2
|
|
|
3
|
-
import android.bluetooth.BluetoothAdapter
|
|
4
3
|
import android.bluetooth.BluetoothManager
|
|
5
4
|
import android.content.Context
|
|
6
5
|
import android.graphics.BitmapFactory
|
|
@@ -14,7 +13,6 @@ import com.brother.sdk.lmprinter.Channel
|
|
|
14
13
|
import com.brother.sdk.lmprinter.NetworkSearchOption
|
|
15
14
|
import com.brother.sdk.lmprinter.PrinterSearcher
|
|
16
15
|
import com.brother.sdk.lmprinter.PrinterSearcher.cancelNetworkSearch
|
|
17
|
-
import com.getcapacitor.JSArray
|
|
18
16
|
import com.getcapacitor.JSObject
|
|
19
17
|
import com.getcapacitor.Plugin
|
|
20
18
|
import android.Manifest;
|
|
@@ -24,6 +22,8 @@ import com.getcapacitor.PluginMethod
|
|
|
24
22
|
import com.getcapacitor.annotation.CapacitorPlugin
|
|
25
23
|
import com.getcapacitor.annotation.Permission
|
|
26
24
|
import com.getcapacitor.annotation.PermissionCallback
|
|
25
|
+
import jp.rdlabo.capacitor.plugin.brotherprint.models.BrotherPrintEvent
|
|
26
|
+
import jp.rdlabo.capacitor.plugin.brotherprint.models.BrotherPrintSettings
|
|
27
27
|
|
|
28
28
|
@CapacitorPlugin(
|
|
29
29
|
name = "BrotherPrint",
|
|
@@ -68,15 +68,12 @@ class BrotherPrint : Plugin() {
|
|
|
68
68
|
val ipAddress: String? = call.getString("ipAddress", "")
|
|
69
69
|
val serialNumber: String? = call.getString("serialNumber", "")
|
|
70
70
|
val macAddress: String? = call.getString("macAddress", "")
|
|
71
|
-
val autoCut: Boolean? = call.getBoolean("autoCut", true)
|
|
72
|
-
|
|
73
|
-
val printerModel = PrinterInfo.Model.entries.find { it.name == call.getString("modelName", "QL_820NWB") }
|
|
74
|
-
val labelName = LabelInfo.QL700.entries.find { it.name == call.getString("labelName", "W62") }
|
|
75
71
|
|
|
76
72
|
val printer = Printer()
|
|
77
|
-
val settings = printer
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
val settings = BrotherPrintSettings().initialize(call, printer)
|
|
74
|
+
|
|
75
|
+
val labelName = LabelInfo.QL700.entries.find { it.name == call.getString("labelName", "W62") }
|
|
76
|
+
val printerModel = PrinterInfo.Model.entries.find { it.name == call.getString("modelName", "QL_820NWB") }
|
|
80
77
|
settings.labelNameIndex = labelName!!.ordinal;
|
|
81
78
|
settings.printerModel = printerModel;
|
|
82
79
|
|
|
@@ -84,7 +81,6 @@ class BrotherPrint : Plugin() {
|
|
|
84
81
|
settings.port = PrinterInfo.Port.USB
|
|
85
82
|
} else if (port == "wifi") {
|
|
86
83
|
settings.port = PrinterInfo.Port.NET
|
|
87
|
-
settings.ipAddress = ipAddress
|
|
88
84
|
} else if (port == "bluetooth") {
|
|
89
85
|
val manager =
|
|
90
86
|
bridge.context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager
|
|
@@ -96,21 +92,11 @@ class BrotherPrint : Plugin() {
|
|
|
96
92
|
bridge.context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager
|
|
97
93
|
printer.setBluetooth(manager.adapter)
|
|
98
94
|
settings.port = PrinterInfo.Port.BLE
|
|
99
|
-
settings.localName = localName
|
|
100
95
|
}
|
|
101
96
|
|
|
102
97
|
settings.ipAddress = ipAddress
|
|
103
98
|
settings.macAddress = macAddress
|
|
104
99
|
settings.localName = localName
|
|
105
|
-
|
|
106
|
-
settings.paperSize = PrinterInfo.PaperSize.CUSTOM
|
|
107
|
-
settings.align = PrinterInfo.Align.CENTER
|
|
108
|
-
settings.valign = PrinterInfo.VAlign.MIDDLE
|
|
109
|
-
settings.printMode = PrinterInfo.PrintMode.ORIGINAL
|
|
110
|
-
settings.printQuality = PrinterInfo.PrintQuality.HIGH_RESOLUTION
|
|
111
|
-
|
|
112
|
-
settings.printMode = PrinterInfo.PrintMode.FIT_TO_PAGE
|
|
113
|
-
|
|
114
100
|
settings.workPath = bridge.context.cacheDir.path
|
|
115
101
|
|
|
116
102
|
Log.d("brother", settings.toString())
|
package/android/src/main/java/jp/rdlabo/capacitor/plugin/brotherprint/models/BrotherPrintSettings.kt
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
package jp.rdlabo.capacitor.plugin.brotherprint.models
|
|
2
|
+
|
|
3
|
+
import com.brother.ptouch.sdk.Printer
|
|
4
|
+
import com.brother.ptouch.sdk.PrinterInfo
|
|
5
|
+
import com.getcapacitor.PluginCall
|
|
6
|
+
|
|
7
|
+
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)!!
|
|
13
|
+
|
|
14
|
+
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
|
|
18
|
+
"ScaleValue" -> {
|
|
19
|
+
settings.printMode = PrinterInfo.PrintMode.SCALE
|
|
20
|
+
if (call.getDouble("scaleValue") !== null) {
|
|
21
|
+
settings.scaleValue = call.getDouble("scaleValue")!!
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
when (call.getString("halftone")) {
|
|
27
|
+
"Threshold" -> {
|
|
28
|
+
settings.halftone = PrinterInfo.Halftone.THRESHOLD
|
|
29
|
+
if (call.getDouble("halftoneThreshold") !== null) {
|
|
30
|
+
settings.thresholdingValue = call.getInt("halftoneThreshold")!!
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
"ErrorDiffusion" -> settings.halftone = PrinterInfo.Halftone.ERRORDIFFUSION
|
|
34
|
+
"PatternDither" -> settings.halftone = PrinterInfo.Halftone.PATTERNDITHER
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
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
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
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
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
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
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// when (call.getString("compressMode")) { }
|
|
57
|
+
|
|
58
|
+
when (call.getString("printQuality")) {
|
|
59
|
+
"Best" -> settings.printQuality = PrinterInfo.PrintQuality.HIGH_RESOLUTION
|
|
60
|
+
"Fast" -> settings.printQuality = PrinterInfo.PrintQuality.DOUBLE_SPEED
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// when (call.getString("resolution")) { }
|
|
64
|
+
|
|
65
|
+
return settings
|
|
66
|
+
}
|
|
67
|
+
}
|
package/dist/docs.json
CHANGED
|
@@ -368,6 +368,204 @@
|
|
|
368
368
|
}
|
|
369
369
|
]
|
|
370
370
|
},
|
|
371
|
+
{
|
|
372
|
+
"name": "BRLMPrinterScaleMode",
|
|
373
|
+
"slug": "brlmprinterscalemode",
|
|
374
|
+
"members": [
|
|
375
|
+
{
|
|
376
|
+
"name": "ActualSize",
|
|
377
|
+
"value": "'ActualSize'",
|
|
378
|
+
"tags": [],
|
|
379
|
+
"docs": ""
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"name": "FitPageAspect",
|
|
383
|
+
"value": "'FitPageAspect'",
|
|
384
|
+
"tags": [],
|
|
385
|
+
"docs": ""
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"name": "FitPaperAspect",
|
|
389
|
+
"value": "'FitPaperAspect'",
|
|
390
|
+
"tags": [],
|
|
391
|
+
"docs": ""
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"name": "ScaleValue",
|
|
395
|
+
"value": "'ScaleValue'",
|
|
396
|
+
"tags": [],
|
|
397
|
+
"docs": ""
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "BRLMPrinterHalftone",
|
|
403
|
+
"slug": "brlmprinterhalftone",
|
|
404
|
+
"members": [
|
|
405
|
+
{
|
|
406
|
+
"name": "Threshold",
|
|
407
|
+
"value": "'Threshold'",
|
|
408
|
+
"tags": [],
|
|
409
|
+
"docs": ""
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"name": "ErrorDiffusion",
|
|
413
|
+
"value": "'ErrorDiffusion'",
|
|
414
|
+
"tags": [],
|
|
415
|
+
"docs": ""
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "PatternDither",
|
|
419
|
+
"value": "'PatternDither'",
|
|
420
|
+
"tags": [],
|
|
421
|
+
"docs": ""
|
|
422
|
+
}
|
|
423
|
+
]
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"name": "BRLMPrinterImageRotation",
|
|
427
|
+
"slug": "brlmprinterimagerotation",
|
|
428
|
+
"members": [
|
|
429
|
+
{
|
|
430
|
+
"name": "Rotate0",
|
|
431
|
+
"value": "'Rotate0'",
|
|
432
|
+
"tags": [],
|
|
433
|
+
"docs": ""
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"name": "Rotate90",
|
|
437
|
+
"value": "'Rotate90'",
|
|
438
|
+
"tags": [],
|
|
439
|
+
"docs": ""
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"name": "Rotate180",
|
|
443
|
+
"value": "'Rotate180'",
|
|
444
|
+
"tags": [],
|
|
445
|
+
"docs": ""
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"name": "Rotate270",
|
|
449
|
+
"value": "'Rotate270'",
|
|
450
|
+
"tags": [],
|
|
451
|
+
"docs": ""
|
|
452
|
+
}
|
|
453
|
+
]
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"name": "BRLMPrinterVerticalAlignment",
|
|
457
|
+
"slug": "brlmprinterverticalalignment",
|
|
458
|
+
"members": [
|
|
459
|
+
{
|
|
460
|
+
"name": "Top",
|
|
461
|
+
"value": "'Top'",
|
|
462
|
+
"tags": [],
|
|
463
|
+
"docs": ""
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"name": "Center",
|
|
467
|
+
"value": "'Center'",
|
|
468
|
+
"tags": [],
|
|
469
|
+
"docs": ""
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"name": "Bottom",
|
|
473
|
+
"value": "'Bottom'",
|
|
474
|
+
"tags": [],
|
|
475
|
+
"docs": ""
|
|
476
|
+
}
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"name": "BRLMPrinterHorizontalAlignment",
|
|
481
|
+
"slug": "brlmprinterhorizontalalignment",
|
|
482
|
+
"members": [
|
|
483
|
+
{
|
|
484
|
+
"name": "Left",
|
|
485
|
+
"value": "'Left'",
|
|
486
|
+
"tags": [],
|
|
487
|
+
"docs": ""
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "Center",
|
|
491
|
+
"value": "'Center'",
|
|
492
|
+
"tags": [],
|
|
493
|
+
"docs": ""
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"name": "Right",
|
|
497
|
+
"value": "'Right'",
|
|
498
|
+
"tags": [],
|
|
499
|
+
"docs": ""
|
|
500
|
+
}
|
|
501
|
+
]
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "BRLMPrinterCompressMode",
|
|
505
|
+
"slug": "brlmprintercompressmode",
|
|
506
|
+
"members": [
|
|
507
|
+
{
|
|
508
|
+
"name": "None",
|
|
509
|
+
"value": "'None'",
|
|
510
|
+
"tags": [],
|
|
511
|
+
"docs": ""
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"name": "Tiff",
|
|
515
|
+
"value": "'Tiff'",
|
|
516
|
+
"tags": [],
|
|
517
|
+
"docs": ""
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "Mode9",
|
|
521
|
+
"value": "'Mode9'",
|
|
522
|
+
"tags": [],
|
|
523
|
+
"docs": ""
|
|
524
|
+
}
|
|
525
|
+
]
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"name": "BRLMPrinterPrintQuality",
|
|
529
|
+
"slug": "brlmprinterprintquality",
|
|
530
|
+
"members": [
|
|
531
|
+
{
|
|
532
|
+
"name": "Best",
|
|
533
|
+
"value": "'Best'",
|
|
534
|
+
"tags": [],
|
|
535
|
+
"docs": ""
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"name": "Fast",
|
|
539
|
+
"value": "'Fast'",
|
|
540
|
+
"tags": [],
|
|
541
|
+
"docs": ""
|
|
542
|
+
}
|
|
543
|
+
]
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"name": "BRLMPrinterPrintResolution",
|
|
547
|
+
"slug": "brlmprinterprintresolution",
|
|
548
|
+
"members": [
|
|
549
|
+
{
|
|
550
|
+
"name": "Low",
|
|
551
|
+
"value": "'Low'",
|
|
552
|
+
"tags": [],
|
|
553
|
+
"docs": ""
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"name": "Normal",
|
|
557
|
+
"value": "'Normal'",
|
|
558
|
+
"tags": [],
|
|
559
|
+
"docs": ""
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"name": "High",
|
|
563
|
+
"value": "'High'",
|
|
564
|
+
"tags": [],
|
|
565
|
+
"docs": ""
|
|
566
|
+
}
|
|
567
|
+
]
|
|
568
|
+
},
|
|
371
569
|
{
|
|
372
570
|
"name": "BrotherPrintEventsEnum",
|
|
373
571
|
"slug": "brotherprinteventsenum",
|
|
@@ -406,22 +604,28 @@
|
|
|
406
604
|
"docs": "",
|
|
407
605
|
"types": [
|
|
408
606
|
{
|
|
409
|
-
"text": "{\n encodedImage: string;\n
|
|
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",
|
|
410
608
|
"complexTypes": [
|
|
411
609
|
"BRLMPrinterLabelName",
|
|
412
|
-
"BRLMPrinterModelName"
|
|
610
|
+
"BRLMPrinterModelName",
|
|
611
|
+
"Partial",
|
|
612
|
+
"BRLMChannelResult",
|
|
613
|
+
"BRLMPrinterSettings"
|
|
413
614
|
]
|
|
414
615
|
}
|
|
415
616
|
]
|
|
416
617
|
},
|
|
417
618
|
{
|
|
418
|
-
"name": "
|
|
419
|
-
"slug": "
|
|
420
|
-
"docs": "",
|
|
619
|
+
"name": "Partial",
|
|
620
|
+
"slug": "partial",
|
|
621
|
+
"docs": "Make all properties in T optional",
|
|
421
622
|
"types": [
|
|
422
623
|
{
|
|
423
|
-
"text": "{\n
|
|
424
|
-
"complexTypes": [
|
|
624
|
+
"text": "{\r\n [P in keyof T]?: T[P];\r\n}",
|
|
625
|
+
"complexTypes": [
|
|
626
|
+
"T",
|
|
627
|
+
"P"
|
|
628
|
+
]
|
|
425
629
|
}
|
|
426
630
|
]
|
|
427
631
|
},
|
|
@@ -436,6 +640,85 @@
|
|
|
436
640
|
}
|
|
437
641
|
]
|
|
438
642
|
},
|
|
643
|
+
{
|
|
644
|
+
"name": "BRLMPrinterSettings",
|
|
645
|
+
"slug": "brlmprintersettings",
|
|
646
|
+
"docs": "These are optional. If these are not set, default values are assigned by the printer.",
|
|
647
|
+
"types": [
|
|
648
|
+
{
|
|
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}",
|
|
650
|
+
"complexTypes": [
|
|
651
|
+
"BRLMPrinterNumberOfCopies",
|
|
652
|
+
"BRLMPrinterAutoCutType",
|
|
653
|
+
"BRLMPrinterScaleMode",
|
|
654
|
+
"BRLMPrinterScaleValueType",
|
|
655
|
+
"BRLMPrinterHalftone",
|
|
656
|
+
"BRLMPrinterHalftoneThresholdType",
|
|
657
|
+
"BRLMPrinterImageRotation",
|
|
658
|
+
"BRLMPrinterVerticalAlignment",
|
|
659
|
+
"BRLMPrinterHorizontalAlignment",
|
|
660
|
+
"BRLMPrinterCompressMode",
|
|
661
|
+
"BRLMPrinterPrintQuality",
|
|
662
|
+
"BRLMPrinterPrintResolution"
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
]
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"name": "BRLMPrinterNumberOfCopies",
|
|
669
|
+
"slug": "brlmprinternumberofcopies",
|
|
670
|
+
"docs": "",
|
|
671
|
+
"types": [
|
|
672
|
+
{
|
|
673
|
+
"text": "number",
|
|
674
|
+
"complexTypes": []
|
|
675
|
+
}
|
|
676
|
+
]
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"name": "BRLMPrinterAutoCutType",
|
|
680
|
+
"slug": "brlmprinterautocuttype",
|
|
681
|
+
"docs": "",
|
|
682
|
+
"types": [
|
|
683
|
+
{
|
|
684
|
+
"text": "boolean",
|
|
685
|
+
"complexTypes": []
|
|
686
|
+
}
|
|
687
|
+
]
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"name": "BRLMPrinterScaleValueType",
|
|
691
|
+
"slug": "brlmprinterscalevaluetype",
|
|
692
|
+
"docs": "",
|
|
693
|
+
"types": [
|
|
694
|
+
{
|
|
695
|
+
"text": "number",
|
|
696
|
+
"complexTypes": []
|
|
697
|
+
}
|
|
698
|
+
]
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"name": "BRLMPrinterHalftoneThresholdType",
|
|
702
|
+
"slug": "brlmprinterhalftonethresholdtype",
|
|
703
|
+
"docs": "",
|
|
704
|
+
"types": [
|
|
705
|
+
{
|
|
706
|
+
"text": "number",
|
|
707
|
+
"complexTypes": []
|
|
708
|
+
}
|
|
709
|
+
]
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"name": "BRLMSearchOption",
|
|
713
|
+
"slug": "brlmsearchoption",
|
|
714
|
+
"docs": "",
|
|
715
|
+
"types": [
|
|
716
|
+
{
|
|
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}",
|
|
718
|
+
"complexTypes": []
|
|
719
|
+
}
|
|
720
|
+
]
|
|
721
|
+
},
|
|
439
722
|
{
|
|
440
723
|
"name": "ErrorInfo",
|
|
441
724
|
"slug": "errorinfo",
|