react-native-printer-imin 0.2.2 → 0.4.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/android/build.gradle +11 -2
- package/android/libs/iminPrinterSDK-10_V1.0.9_2306201823.jar +0 -0
- package/android/src/main/AndroidManifest.xml +3 -1
- package/android/src/main/AndroidManifestNew.xml +3 -4
- package/android/src/main/java/com/printerimin/PrinterIminModule.java +582 -24
- package/lib/commonjs/index.js +253 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/typing.js +61 -45
- package/lib/commonjs/typing.js.map +1 -1
- package/lib/module/index.js +190 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/typing.js +59 -47
- package/lib/module/typing.js.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/typing.d.ts +125 -1
- package/lib/typescript/src/typing.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +247 -4
- package/src/typing.ts +152 -47
- package/android/libs/iminPrinterSDK.jar +0 -0
package/lib/module/typing.js
CHANGED
|
@@ -1,54 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
export let IminTypeface = /*#__PURE__*/function (IminTypeface) {
|
|
2
|
+
IminTypeface[IminTypeface["Default"] = 0] = "Default";
|
|
3
|
+
IminTypeface[IminTypeface["Monospace"] = 1] = "Monospace";
|
|
4
|
+
IminTypeface[IminTypeface["DefaultBold"] = 2] = "DefaultBold";
|
|
5
|
+
IminTypeface[IminTypeface["SansSerif"] = 3] = "SansSerif";
|
|
6
|
+
IminTypeface[IminTypeface["Serif"] = 4] = "Serif";
|
|
7
|
+
return IminTypeface;
|
|
8
|
+
}({});
|
|
9
|
+
export let IminFontStyle = /*#__PURE__*/function (IminFontStyle) {
|
|
10
|
+
IminFontStyle[IminFontStyle["normal"] = 0] = "normal";
|
|
11
|
+
IminFontStyle[IminFontStyle["bold"] = 1] = "bold";
|
|
12
|
+
IminFontStyle[IminFontStyle["italic"] = 2] = "italic";
|
|
13
|
+
IminFontStyle[IminFontStyle["boldItalic"] = 3] = "boldItalic";
|
|
14
|
+
return IminFontStyle;
|
|
15
|
+
}({});
|
|
15
16
|
export let IminPrintAlign = /*#__PURE__*/function (IminPrintAlign) {
|
|
16
17
|
IminPrintAlign[IminPrintAlign["left"] = 0] = "left";
|
|
17
18
|
IminPrintAlign[IminPrintAlign["center"] = 1] = "center";
|
|
18
19
|
IminPrintAlign[IminPrintAlign["right"] = 2] = "right";
|
|
19
20
|
return IminPrintAlign;
|
|
20
21
|
}({});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
22
|
+
export let IminQrcodeCorrectionLevel = /*#__PURE__*/function (IminQrcodeCorrectionLevel) {
|
|
23
|
+
IminQrcodeCorrectionLevel[IminQrcodeCorrectionLevel["levelL"] = 48] = "levelL";
|
|
24
|
+
IminQrcodeCorrectionLevel[IminQrcodeCorrectionLevel["levelM"] = 49] = "levelM";
|
|
25
|
+
IminQrcodeCorrectionLevel[IminQrcodeCorrectionLevel["levelQ"] = 50] = "levelQ";
|
|
26
|
+
IminQrcodeCorrectionLevel[IminQrcodeCorrectionLevel["levelH"] = 51] = "levelH";
|
|
27
|
+
return IminQrcodeCorrectionLevel;
|
|
28
|
+
}({});
|
|
29
|
+
export let IminBarcodeTextPos = /*#__PURE__*/function (IminBarcodeTextPos) {
|
|
30
|
+
IminBarcodeTextPos[IminBarcodeTextPos["none"] = 0] = "none";
|
|
31
|
+
IminBarcodeTextPos[IminBarcodeTextPos["aboveText"] = 1] = "aboveText";
|
|
32
|
+
IminBarcodeTextPos[IminBarcodeTextPos["belowText"] = 2] = "belowText";
|
|
33
|
+
IminBarcodeTextPos[IminBarcodeTextPos["both"] = 3] = "both";
|
|
34
|
+
return IminBarcodeTextPos;
|
|
35
|
+
}({});
|
|
36
|
+
export let IminBarcodeType = /*#__PURE__*/function (IminBarcodeType) {
|
|
37
|
+
IminBarcodeType[IminBarcodeType["upcA"] = 0] = "upcA";
|
|
38
|
+
IminBarcodeType[IminBarcodeType["upcE"] = 1] = "upcE";
|
|
39
|
+
IminBarcodeType[IminBarcodeType["jan13"] = 2] = "jan13";
|
|
40
|
+
IminBarcodeType[IminBarcodeType["jan8"] = 3] = "jan8";
|
|
41
|
+
IminBarcodeType[IminBarcodeType["code39"] = 4] = "code39";
|
|
42
|
+
IminBarcodeType[IminBarcodeType["itf"] = 5] = "itf";
|
|
43
|
+
IminBarcodeType[IminBarcodeType["codabar"] = 6] = "codabar";
|
|
44
|
+
IminBarcodeType[IminBarcodeType["code128"] = 73] = "code128";
|
|
45
|
+
return IminBarcodeType;
|
|
46
|
+
}({});
|
|
47
|
+
export let IminBarCodeToBitmapFormat = /*#__PURE__*/function (IminBarCodeToBitmapFormat) {
|
|
48
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["aztec"] = 0] = "aztec";
|
|
49
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["codabar"] = 1] = "codabar";
|
|
50
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["code39"] = 2] = "code39";
|
|
51
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["code93"] = 3] = "code93";
|
|
52
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["code128"] = 4] = "code128";
|
|
53
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["dataMatrix"] = 5] = "dataMatrix";
|
|
54
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["ean13"] = 6] = "ean13";
|
|
55
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["itf"] = 7] = "itf";
|
|
56
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["maxicode"] = 8] = "maxicode";
|
|
57
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["pdf417"] = 9] = "pdf417";
|
|
58
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["qrCode"] = 10] = "qrCode";
|
|
59
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["rss14"] = 11] = "rss14";
|
|
60
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["rssExpanded"] = 12] = "rssExpanded";
|
|
61
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["upcA"] = 13] = "upcA";
|
|
62
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["upcE"] = 14] = "upcE";
|
|
63
|
+
IminBarCodeToBitmapFormat[IminBarCodeToBitmapFormat["upcEanExteNsion"] = 15] = "upcEanExteNsion";
|
|
64
|
+
return IminBarCodeToBitmapFormat;
|
|
65
|
+
}({});
|
|
54
66
|
//# sourceMappingURL=typing.js.map
|
package/lib/module/typing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IminPrintAlign"],"sourceRoot":"..\\..\\src","sources":["typing.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["IminTypeface","IminFontStyle","IminPrintAlign","IminQrcodeCorrectionLevel","IminBarcodeTextPos","IminB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,eAAe;AAAA;AAW3B,WAAYC,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IminPrinterType } from './typing';
|
|
2
|
-
|
|
2
|
+
import { IminPrintAlign, IminTypeface, IminFontStyle, IminQrcodeCorrectionLevel, IminBarCodeToBitmapFormat, IminBarCodeStyle, IminBarcodeType, IminBarcodeTextPos, IminQrCodeStyle, IminDoubleQRCodeStyle, IminPictureStyle, IminBaseStyle } from './typing';
|
|
3
|
+
export { IminPrintAlign, IminFontStyle, IminTypeface, IminQrcodeCorrectionLevel, IminBarCodeToBitmapFormat, IminBarCodeStyle, IminBarcodeType, IminBarcodeTextPos, IminQrCodeStyle, IminDoubleQRCodeStyle, IminPictureStyle, IminBaseStyle, };
|
|
3
4
|
declare const PrinterSDK: IminPrinterType;
|
|
4
5
|
export default PrinterSDK;
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,UAAU,CAAC;AAC/D,OAAO,EACL,cAAc,EACd,YAAY,EACZ,aAAa,EACb,yBAAyB,EACzB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,GACd,CAAC;AAkBF,QAAA,MAAM,UAAU,EAAE,eAsNjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,14 +1,138 @@
|
|
|
1
|
+
import type { ImageSourcePropType } from 'react-native';
|
|
2
|
+
export declare enum IminTypeface {
|
|
3
|
+
Default = 0,
|
|
4
|
+
Monospace = 1,
|
|
5
|
+
DefaultBold = 2,
|
|
6
|
+
SansSerif = 3,
|
|
7
|
+
Serif = 4
|
|
8
|
+
}
|
|
9
|
+
export declare enum IminFontStyle {
|
|
10
|
+
normal = 0,
|
|
11
|
+
bold = 1,
|
|
12
|
+
italic = 2,
|
|
13
|
+
boldItalic = 3
|
|
14
|
+
}
|
|
1
15
|
export declare enum IminPrintAlign {
|
|
2
16
|
left = 0,
|
|
3
17
|
center = 1,
|
|
4
18
|
right = 2
|
|
5
19
|
}
|
|
20
|
+
export declare enum IminQrcodeCorrectionLevel {
|
|
21
|
+
levelL = 48,
|
|
22
|
+
levelM = 49,
|
|
23
|
+
levelQ = 50,
|
|
24
|
+
levelH = 51
|
|
25
|
+
}
|
|
26
|
+
export declare enum IminBarcodeTextPos {
|
|
27
|
+
none = 0,
|
|
28
|
+
aboveText = 1,
|
|
29
|
+
belowText = 2,
|
|
30
|
+
both = 3
|
|
31
|
+
}
|
|
32
|
+
export declare enum IminBarcodeType {
|
|
33
|
+
upcA = 0,
|
|
34
|
+
upcE = 1,
|
|
35
|
+
jan13 = 2,
|
|
36
|
+
jan8 = 3,
|
|
37
|
+
code39 = 4,
|
|
38
|
+
itf = 5,
|
|
39
|
+
codabar = 6,
|
|
40
|
+
code128 = 73
|
|
41
|
+
}
|
|
42
|
+
export declare enum IminBarCodeToBitmapFormat {
|
|
43
|
+
aztec = 0,
|
|
44
|
+
codabar = 1,
|
|
45
|
+
code39 = 2,
|
|
46
|
+
code93 = 3,
|
|
47
|
+
code128 = 4,
|
|
48
|
+
dataMatrix = 5,
|
|
49
|
+
ean13 = 6,
|
|
50
|
+
itf = 7,
|
|
51
|
+
maxicode = 8,
|
|
52
|
+
pdf417 = 9,
|
|
53
|
+
qrCode = 10,
|
|
54
|
+
rss14 = 11,
|
|
55
|
+
rssExpanded = 12,
|
|
56
|
+
upcA = 13,
|
|
57
|
+
upcE = 14,
|
|
58
|
+
upcEanExteNsion = 15
|
|
59
|
+
}
|
|
60
|
+
export interface IminBaseStyle {
|
|
61
|
+
width?: number;
|
|
62
|
+
height?: number;
|
|
63
|
+
}
|
|
64
|
+
export interface IminBarCodeStyle extends IminBaseStyle {
|
|
65
|
+
position?: IminBarcodeTextPos;
|
|
66
|
+
align?: IminPrintAlign;
|
|
67
|
+
}
|
|
68
|
+
export interface IminTextStyle {
|
|
69
|
+
wordWrap?: boolean;
|
|
70
|
+
fontSize?: number;
|
|
71
|
+
space?: number;
|
|
72
|
+
width?: number;
|
|
73
|
+
typeface?: IminTypeface;
|
|
74
|
+
fontStyle?: IminFontStyle;
|
|
75
|
+
align?: IminPrintAlign;
|
|
76
|
+
}
|
|
77
|
+
export interface IminDoubleQRCodeStyle {
|
|
78
|
+
text: string;
|
|
79
|
+
level?: number;
|
|
80
|
+
leftMargin?: number;
|
|
81
|
+
version?: number;
|
|
82
|
+
}
|
|
83
|
+
export interface IminQrCodeStyle {
|
|
84
|
+
qrSize?: number;
|
|
85
|
+
align?: IminPrintAlign;
|
|
86
|
+
leftMargin?: number;
|
|
87
|
+
errorCorrectionLevel?: IminQrcodeCorrectionLevel;
|
|
88
|
+
}
|
|
89
|
+
export interface IminPictureStyle extends IminBaseStyle {
|
|
90
|
+
align?: IminPrintAlign;
|
|
91
|
+
}
|
|
6
92
|
export type IminPrinterType = {
|
|
7
93
|
initPrinter: () => Promise<string>;
|
|
8
94
|
getPrinterStatus: () => Promise<{
|
|
9
95
|
code: number;
|
|
10
96
|
message: string;
|
|
11
97
|
}>;
|
|
12
|
-
|
|
98
|
+
setTextSize: (size: number) => Promise<void>;
|
|
99
|
+
setTextTypeface: (font: number) => Promise<void>;
|
|
100
|
+
setTextStyle: (style: number) => Promise<void>;
|
|
101
|
+
setAlignment: (align: number) => Promise<void>;
|
|
102
|
+
setTextLineSpacing: (spacing: number) => Promise<void>;
|
|
103
|
+
printText: (text: string, style?: IminTextStyle) => void;
|
|
104
|
+
printAntiWhiteText: (text: string, style?: IminTextStyle) => void;
|
|
105
|
+
setTextWidth: (width: number) => Promise<void>;
|
|
106
|
+
printAndLineFeed: () => Promise<void>;
|
|
107
|
+
printAndFeedPaper: (height: number) => Promise<void>;
|
|
108
|
+
printColumnsText: (cols: {
|
|
109
|
+
text: string;
|
|
110
|
+
width: number;
|
|
111
|
+
align: IminPrintAlign;
|
|
112
|
+
fontSize: number;
|
|
113
|
+
}[]) => Promise<void>;
|
|
114
|
+
setPageFormat: (style?: number) => Promise<void>;
|
|
115
|
+
partialCut: () => Promise<void>;
|
|
116
|
+
printSingleBitmap: (uri: string | ImageSourcePropType, pictureStyle?: IminPictureStyle) => Promise<void>;
|
|
117
|
+
printMultiBitmap: (imgs: (string | ImageSourcePropType)[], pictureStyle?: IminPictureStyle) => Promise<void>;
|
|
118
|
+
printSingleBitmapBlackWhite: (uri: string | ImageSourcePropType, baseStyle?: IminBaseStyle) => Promise<void>;
|
|
119
|
+
setQrCodeSize: (qrSize: number) => Promise<void>;
|
|
120
|
+
setLeftMargin: (margin: number) => Promise<void>;
|
|
121
|
+
setQrCodeErrorCorrectionLev: (level: IminQrcodeCorrectionLevel) => Promise<void>;
|
|
122
|
+
setBarCodeWidth: (width: number) => Promise<void>;
|
|
123
|
+
setBarCodeHeight: (height: number) => Promise<void>;
|
|
124
|
+
setBarCodeContentPrintPos: (position: IminBarcodeTextPos) => Promise<void>;
|
|
125
|
+
printBarCode: (barCodeType: IminBarcodeType, barCodeContent: string, style?: IminBarCodeStyle) => Promise<void>;
|
|
126
|
+
setDoubleQRSize: (size: number) => Promise<void>;
|
|
127
|
+
setDoubleQR1Level: (level: number) => Promise<void>;
|
|
128
|
+
setDoubleQR2Level: (level: number) => Promise<void>;
|
|
129
|
+
setDoubleQR1MarginLeft: (leftMargin: number) => Promise<void>;
|
|
130
|
+
setDoubleQR2MarginLeft: (leftMargin: number) => Promise<void>;
|
|
131
|
+
setDoubleQR1Version: (version: number) => Promise<void>;
|
|
132
|
+
setDoubleQR2Version: (version: number) => Promise<void>;
|
|
133
|
+
printQrCode: (data: string, qrCodeStyle?: IminQrCodeStyle) => Promise<void>;
|
|
134
|
+
printDoubleQR: (qrCode1: IminDoubleQRCodeStyle, qrCode2: IminDoubleQRCodeStyle, doubleQRSize: number) => Promise<void>;
|
|
135
|
+
setInitIminPrinter: (isDefaultPrinter: boolean) => Promise<void>;
|
|
136
|
+
resetDevice: () => Promise<void>;
|
|
13
137
|
};
|
|
14
138
|
//# sourceMappingURL=typing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typing.d.ts","sourceRoot":"","sources":["../../../src/typing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typing.d.ts","sourceRoot":"","sources":["../../../src/typing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,oBA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qB,EAC9B,OAAO,EAAE,qBAAqB,EAC9B,YAAY,EAAE,MAAM,KACjB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC,CAAC"}
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
NativeModules,
|
|
3
|
+
Platform,
|
|
4
|
+
Image,
|
|
5
|
+
type ImageSourcePropType,
|
|
6
|
+
type ImageResolvedAssetSource,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
import type { IminPrinterType, IminTextStyle } from './typing';
|
|
9
|
+
import {
|
|
10
|
+
IminPrintAlign,
|
|
11
|
+
IminTypeface,
|
|
12
|
+
IminFontStyle,
|
|
13
|
+
IminQrcodeCorrectionLevel,
|
|
14
|
+
IminBarCodeToBitmapFormat,
|
|
15
|
+
IminBarCodeStyle,
|
|
16
|
+
IminBarcodeType,
|
|
17
|
+
IminBarcodeTextPos,
|
|
18
|
+
IminQrCodeStyle,
|
|
19
|
+
IminDoubleQRCodeStyle,
|
|
20
|
+
IminPictureStyle,
|
|
21
|
+
IminBaseStyle,
|
|
22
|
+
} from './typing';
|
|
23
|
+
export {
|
|
24
|
+
IminPrintAlign,
|
|
25
|
+
IminFontStyle,
|
|
26
|
+
IminTypeface,
|
|
27
|
+
IminQrcodeCorrectionLevel,
|
|
28
|
+
IminBarCodeToBitmapFormat,
|
|
29
|
+
IminBarCodeStyle,
|
|
30
|
+
IminBarcodeType,
|
|
31
|
+
IminBarcodeTextPos,
|
|
32
|
+
IminQrCodeStyle,
|
|
33
|
+
IminDoubleQRCodeStyle,
|
|
34
|
+
IminPictureStyle,
|
|
35
|
+
IminBaseStyle,
|
|
36
|
+
};
|
|
4
37
|
const LINKING_ERROR =
|
|
5
38
|
`The package 'react-native-printer-imin' doesn't seem to be linked. Make sure: \n\n` +
|
|
6
39
|
Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
|
|
@@ -21,7 +54,217 @@ const PrinterImin = NativeModules.PrinterImin
|
|
|
21
54
|
const PrinterSDK: IminPrinterType = {
|
|
22
55
|
initPrinter: PrinterImin.initPrinter,
|
|
23
56
|
getPrinterStatus: PrinterImin.getPrinterStatus,
|
|
24
|
-
|
|
57
|
+
setTextSize: PrinterImin.setTextSize,
|
|
58
|
+
setTextTypeface: PrinterImin.setTextTypeface,
|
|
59
|
+
setTextStyle: PrinterImin.setTextStyle,
|
|
60
|
+
setAlignment: PrinterImin.setAlignment,
|
|
61
|
+
setTextLineSpacing: PrinterImin.setTextLineSpacing,
|
|
62
|
+
printText(text: string, style?: IminTextStyle) {
|
|
63
|
+
let textStr = `${text}\n`;
|
|
64
|
+
if (style) {
|
|
65
|
+
if (style.wordWrap !== undefined && style.wordWrap === false) {
|
|
66
|
+
textStr = text;
|
|
67
|
+
}
|
|
68
|
+
if (style.align !== undefined) {
|
|
69
|
+
PrinterImin.setAlignment(style.align);
|
|
70
|
+
}
|
|
71
|
+
if (style.width !== undefined) {
|
|
72
|
+
PrinterImin.setTextWidth(style.width);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (style.fontSize !== undefined) {
|
|
76
|
+
PrinterImin.setTextSize(style.fontSize);
|
|
77
|
+
}
|
|
78
|
+
if (style.typeface !== undefined) {
|
|
79
|
+
PrinterImin.setTextTypeface(style.typeface);
|
|
80
|
+
}
|
|
81
|
+
if (style.fontStyle !== undefined) {
|
|
82
|
+
PrinterImin.setTextStyle(style.fontStyle);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
PrinterImin.printText(textStr).then(() => {
|
|
86
|
+
if (style?.align !== undefined) {
|
|
87
|
+
PrinterImin.setAlignment(IminPrintAlign.left);
|
|
88
|
+
}
|
|
89
|
+
if (style?.typeface !== undefined) {
|
|
90
|
+
PrinterImin.setTextTypeface(IminTypeface.Default);
|
|
91
|
+
}
|
|
92
|
+
if (style?.fontStyle !== undefined) {
|
|
93
|
+
PrinterImin.setTextStyle(IminFontStyle.normal);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
printAntiWhiteText(text: string, style?: IminTextStyle) {
|
|
98
|
+
let textStr = `${text}\n`;
|
|
99
|
+
if (style) {
|
|
100
|
+
if (style.wordWrap !== undefined && style.wordWrap === false) {
|
|
101
|
+
textStr = text;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (style.align !== undefined) {
|
|
105
|
+
PrinterImin.setAlignment(style.align);
|
|
106
|
+
}
|
|
107
|
+
if (style.width !== undefined) {
|
|
108
|
+
PrinterImin.setTextWidth(style.width);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (style.fontSize !== undefined) {
|
|
112
|
+
PrinterImin.setTextSize(style.fontSize);
|
|
113
|
+
}
|
|
114
|
+
if (style.typeface !== undefined) {
|
|
115
|
+
PrinterImin.setTextTypeface(style.typeface);
|
|
116
|
+
}
|
|
117
|
+
if (style.fontStyle !== undefined) {
|
|
118
|
+
PrinterImin.setTextStyle(style.fontStyle);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
PrinterImin.printAntiWhiteText(textStr).then(() => {
|
|
122
|
+
if (style?.align !== undefined) {
|
|
123
|
+
PrinterImin.setAlignment(IminPrintAlign.left);
|
|
124
|
+
}
|
|
125
|
+
if (style?.typeface !== undefined) {
|
|
126
|
+
PrinterImin.setTextTypeface(IminTypeface.Default);
|
|
127
|
+
}
|
|
128
|
+
if (style?.fontStyle !== undefined) {
|
|
129
|
+
PrinterImin.setTextStyle(IminFontStyle.normal);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
setTextWidth: PrinterImin.setTextWidth,
|
|
134
|
+
printAndLineFeed: PrinterImin.printAndLineFeed,
|
|
135
|
+
printAndFeedPaper: PrinterImin.printAndFeedPaper,
|
|
136
|
+
printColumnsText: PrinterImin.printColumnsText,
|
|
137
|
+
setPageFormat: PrinterImin.setPageFormat,
|
|
138
|
+
partialCut: PrinterImin.partialCut,
|
|
139
|
+
printSingleBitmap(
|
|
140
|
+
uri: string | ImageSourcePropType,
|
|
141
|
+
pictureStyle?: IminPictureStyle
|
|
142
|
+
) {
|
|
143
|
+
const path = Image.resolveAssetSource(uri as ImageSourcePropType);
|
|
144
|
+
console.log('path', path);
|
|
145
|
+
return PrinterImin.printSingleBitmap({
|
|
146
|
+
url: path?.uri || uri,
|
|
147
|
+
align: pictureStyle?.align,
|
|
148
|
+
width: pictureStyle?.width,
|
|
149
|
+
height: pictureStyle?.height,
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
printMultiBitmap(
|
|
153
|
+
imgs: (string | ImageSourcePropType)[],
|
|
154
|
+
pictureStyle?: IminPictureStyle
|
|
155
|
+
) {
|
|
156
|
+
const imgList: (
|
|
157
|
+
| ImageResolvedAssetSource['uri']
|
|
158
|
+
| string
|
|
159
|
+
| ImageSourcePropType
|
|
160
|
+
)[] = [];
|
|
161
|
+
imgs.forEach((imgUri) => {
|
|
162
|
+
imgList.push(
|
|
163
|
+
Image.resolveAssetSource(imgUri as ImageSourcePropType)?.uri || imgUri
|
|
164
|
+
);
|
|
165
|
+
});
|
|
166
|
+
return PrinterImin.printMultiBitmap({
|
|
167
|
+
urls: imgList,
|
|
168
|
+
align: pictureStyle?.align,
|
|
169
|
+
width: pictureStyle?.width,
|
|
170
|
+
height: pictureStyle?.height,
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
printSingleBitmapBlackWhite(
|
|
174
|
+
uri: string | ImageSourcePropType,
|
|
175
|
+
baseStyle?: IminBaseStyle
|
|
176
|
+
) {
|
|
177
|
+
const path = Image.resolveAssetSource(uri as ImageSourcePropType);
|
|
178
|
+
return PrinterImin.printSingleBitmapBlackWhite({
|
|
179
|
+
url: path?.uri || uri,
|
|
180
|
+
width: baseStyle?.width,
|
|
181
|
+
height: baseStyle?.height,
|
|
182
|
+
});
|
|
183
|
+
},
|
|
184
|
+
setQrCodeSize: PrinterImin.setQrCodeSize,
|
|
185
|
+
setLeftMargin: PrinterImin.setLeftMargin,
|
|
186
|
+
setQrCodeErrorCorrectionLev: PrinterImin.setQrCodeErrorCorrectionLev,
|
|
187
|
+
setBarCodeWidth: PrinterImin.setBarCodeWidth,
|
|
188
|
+
setBarCodeHeight: PrinterImin.setBarCodeHeight,
|
|
189
|
+
setBarCodeContentPrintPos: PrinterImin.setBarCodeContentPrintPos,
|
|
190
|
+
printBarCode(
|
|
191
|
+
barCodeType: IminBarcodeType,
|
|
192
|
+
barCodeContent: string,
|
|
193
|
+
style?: IminBarCodeStyle
|
|
194
|
+
) {
|
|
195
|
+
if (style !== undefined) {
|
|
196
|
+
if (style.width !== undefined) {
|
|
197
|
+
PrinterImin.setBarCodeWidth(style.width);
|
|
198
|
+
}
|
|
199
|
+
if (style.height !== undefined) {
|
|
200
|
+
PrinterImin.setBarCodeHeight(style.height);
|
|
201
|
+
}
|
|
202
|
+
if (style.position !== undefined) {
|
|
203
|
+
PrinterImin.setBarCodeContentPrintPos(style.position);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return PrinterImin.printBarCode({
|
|
207
|
+
data: barCodeContent,
|
|
208
|
+
type: barCodeType,
|
|
209
|
+
align: style?.align,
|
|
210
|
+
});
|
|
211
|
+
},
|
|
212
|
+
setDoubleQRSize: PrinterImin.setDoubleQRSize,
|
|
213
|
+
setDoubleQR1Level: PrinterImin.setDoubleQR1Level,
|
|
214
|
+
setDoubleQR2Level: PrinterImin.setDoubleQR2Level,
|
|
215
|
+
setDoubleQR1MarginLeft: PrinterImin.setDoubleQR1MarginLeft,
|
|
216
|
+
setDoubleQR2MarginLeft: PrinterImin.setDoubleQR2MarginLeft,
|
|
217
|
+
setDoubleQR1Version: PrinterImin.setDoubleQR1Version,
|
|
218
|
+
setDoubleQR2Version: PrinterImin.setDoubleQR2Version,
|
|
219
|
+
printQrCode(data: string, qrCodeStyle?: IminQrCodeStyle) {
|
|
220
|
+
if (qrCodeStyle !== undefined) {
|
|
221
|
+
if (qrCodeStyle.qrSize !== undefined) {
|
|
222
|
+
PrinterImin.setQrCodeSize(qrCodeStyle.qrSize);
|
|
223
|
+
}
|
|
224
|
+
if (qrCodeStyle.leftMargin !== undefined) {
|
|
225
|
+
PrinterImin.setLeftMargin(qrCodeStyle.leftMargin);
|
|
226
|
+
}
|
|
227
|
+
if (qrCodeStyle.errorCorrectionLevel !== undefined) {
|
|
228
|
+
PrinterImin.setQrCodeErrorCorrectionLev(
|
|
229
|
+
qrCodeStyle.errorCorrectionLevel
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return PrinterImin.printQrCode({ data, align: qrCodeStyle?.align });
|
|
234
|
+
},
|
|
235
|
+
printDoubleQR(
|
|
236
|
+
qrCode1: IminDoubleQRCodeStyle,
|
|
237
|
+
qrCode2: IminDoubleQRCodeStyle,
|
|
238
|
+
doubleQRSize: number
|
|
239
|
+
) {
|
|
240
|
+
if (qrCode1.leftMargin !== undefined) {
|
|
241
|
+
PrinterImin.setDoubleQR1MarginLeft(qrCode1.leftMargin);
|
|
242
|
+
}
|
|
243
|
+
if (qrCode2.leftMargin !== undefined) {
|
|
244
|
+
PrinterImin.setDoubleQR2MarginLeft(qrCode2.leftMargin);
|
|
245
|
+
}
|
|
246
|
+
if (qrCode1.level !== undefined) {
|
|
247
|
+
PrinterImin.setDoubleQR1Level(qrCode1.level);
|
|
248
|
+
}
|
|
249
|
+
if (qrCode2.level !== undefined) {
|
|
250
|
+
PrinterImin.setDoubleQR2Level(qrCode2.level);
|
|
251
|
+
}
|
|
252
|
+
if (qrCode1.version !== undefined) {
|
|
253
|
+
PrinterImin.setDoubleQR1Version(qrCode1.version);
|
|
254
|
+
}
|
|
255
|
+
if (qrCode2.version !== undefined) {
|
|
256
|
+
PrinterImin.setDoubleQR2Version(qrCode2.version);
|
|
257
|
+
}
|
|
258
|
+
if (doubleQRSize !== undefined) {
|
|
259
|
+
PrinterImin.setDoubleQRSize(doubleQRSize);
|
|
260
|
+
}
|
|
261
|
+
return PrinterImin.printDoubleQR({
|
|
262
|
+
qrCode1Text: qrCode1.text,
|
|
263
|
+
qrCode2Text: qrCode2.text,
|
|
264
|
+
});
|
|
265
|
+
},
|
|
266
|
+
setInitIminPrinter: PrinterImin.setInitIminPrinter,
|
|
267
|
+
resetDevice: PrinterImin.resetDevice,
|
|
25
268
|
};
|
|
26
269
|
|
|
27
270
|
export default PrinterSDK;
|