2.2.0 • Published 7 months ago

cap-label-printer-plugin v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

cap-label-printer-plugin

An capacitor plugin for integrating with any label printer

Install

npm install cap-label-printer-plugin
npx cap sync

API

printLabel(...)

printLabel(opts: PrintingOptions) => Promise<void>

Print a label using EPL commands to a specific printer.

ParamTypeDescription
optsPrintingOptions- The printing options, including printer name, address, and EPL commands.

discover()

discover() => Promise<PrinterDevices>

Discover available label printer devices.

Returns: Promise<PrinterDevices>


Interfaces

PrintingOptions

Represents the options for printing labels using the EPL (Eltron Programming Language) commands or a base64 encoded string image.

PropTypeDescription
namestringThe name of the printer to use.
addressstringThe network address, device ID, or connection URL of the printer.
eplCommandsstringThe EPL commands to send to the printer for printing.
imagestringThe base64 encoded image to print on the label.
widthnumberThe width of the label in pixels. default is 562px
heightnumberThe height of the label in pixels. default is auto.
urlstringThe URL of the raw label commands to print.

PrinterDevices

Represents a collection of printer devices.

PropTypeDescription
devicesPrinterDevice[]An array of printer devices.

PrinterDevice

Represents a printer device with its name, address, and port information.

PropTypeDescription
namestringThe name or model of the printer device.
addressstringThe network address, device ID, or connection URL of the printer.
port'USB' | 'NET' | 'BT' | 'Browser'The port protocol used to communicate with the printer. Should be one of "USB", "NET", "BT" (for Bluetooth), or "Browser"
2.2.0

7 months ago

2.1.1

8 months ago

2.1.0

9 months ago

2.0.4

10 months ago

1.5.2

11 months ago

1.5.1

11 months ago

1.5.0

11 months ago

2.0.3

10 months ago

2.0.2

10 months ago

2.0.1

11 months ago

2.0.0

11 months ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.4.0-beta

1 year ago

1.4.0-alpha

1 year ago