LPAPI
npm install lpapi-plugin
npx cap sync
getPairedPrinters()
connectPrinter(...)
disconnectPrinter()
printText(...)
printText1DBarcode(...)
drawText(...)
drawText1DBarcode(...)
getPrinterState()
drawCircle(...)
drawRect(...)
drawLine(...)
startJob(...)
abortJob()
commitJob()
- Interfaces
getPairedPrinters() => Promise<any>
Returns: Promise<any>
connectPrinter(options: PrinterAddress) => Promise<any>
Param | Type |
---|---|
options |
PrinterAddress |
Returns: Promise<any>
disconnectPrinter() => Promise<any>
Returns: Promise<any>
printText(options: PrinterOptions) => Promise<any>
Param | Type |
---|---|
options |
PrinterOptions |
Returns: Promise<any>
printText1DBarcode(options: PrinterOptions) => Promise<any>
Param | Type |
---|---|
options |
PrinterOptions |
Returns: Promise<any>
drawText(options: TextOptions) => Promise<any>
Param | Type |
---|---|
options |
TextOptions |
Returns: Promise<any>
drawText1DBarcode(options: TextOptions) => Promise<any>
Param | Type |
---|---|
options |
TextOptions |
Returns: Promise<any>
getPrinterState() => Promise<any>
Returns: Promise<any>
drawCircle(options: ShapeOptions) => Promise<any>
Param | Type |
---|---|
options |
ShapeOptions |
Returns: Promise<any>
drawRect(options: ShapeOptions) => Promise<any>
Param | Type |
---|---|
options |
ShapeOptions |
Returns: Promise<any>
drawLine(options: ShapeOptions) => Promise<any>
Param | Type |
---|---|
options |
ShapeOptions |
Returns: Promise<any>
startJob(option: LabelOptions) => Promise<any>
Param | Type |
---|---|
option |
LabelOptions |
Returns: Promise<any>
abortJob() => Promise<any>
Returns: Promise<any>
commitJob() => Promise<any>
Returns: Promise<any>
Prop | Type |
---|---|
name |
string |
address |
string |
Prop | Type |
---|---|
text |
string |
x |
number |
y |
number |
width |
number |
height |
number |
textHeight |
number |
Prop | Type |
---|---|
v |
number |
v1 |
number |
v2 |
number |
v3 |
number |
v4 |
number |
Prop | Type |
---|---|
labelWidth |
number |
labelHeight |
number |