# @uniquedj95/label-printer

> A capacitor plugin for integrating with any label printer

Latest version **0.3.4** (published 2023-09-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @uniquedj95/label-printer
pnpm add @uniquedj95/label-printer
yarn add @uniquedj95/label-printer
bun add @uniquedj95/label-printer
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.4 |
| Published | 2023-09-12 |
| First published | 2023-08-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | uniquedj95 |
| Keywords | capacitor, plugin, native |

## Links

- npm: https://www.npmjs.com/package/@uniquedj95/label-printer
- Repository: https://github.com/uniquedj95/cap-label-printer
- Homepage: https://github.com/uniquedj95/cap-label-printer#readme
- Issues: https://github.com/uniquedj95/cap-label-printer/issues
- npm.io page: https://npm.io/package/@uniquedj95/label-printer

## Recent versions

- 0.3.4 (latest) — 2023-09-12
- 0.3.3 — 2023-09-12
- 0.1.1 — 2023-09-05
- 0.1.0 — 2023-09-05
- 0.0.1-alpha — 2023-08-24
- 0.0.3-1 — 2023-08-24
- 0.0.3-0 — 2023-08-23
- 0.0.2-0 — 2023-08-23
- 0.0.1 — 2023-08-23

## README

# @uniquedj95/label-printer

An capacitor plugin for integrating with any label printer

## Install

```bash
npm install @uniquedj95/label-printer
npx cap sync
```

## API

<docgen-index>

* [`printEPL(...)`](#printepl)
* [`discover()`](#discover)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### printEPL(...)

```typescript
printEPL(opts: PrintEPLOptions) => Promise<void>
```

Print a label using EPL commands to a specific printer.

| Param      | Type                                                        | Description                                                                |
| ---------- | ----------------------------------------------------------- | -------------------------------------------------------------------------- |
| **`opts`** | <code><a href="#printeploptions">PrintEPLOptions</a></code> | - The printing options, including printer name, address, and EPL commands. |

--------------------


### discover()

```typescript
discover() => Promise<PrinterDevices>
```

Discover available label printer devices.

**Returns:** <code>Promise&lt;<a href="#printerdevices">PrinterDevices</a>&gt;</code>

--------------------


### Interfaces


#### PrintEPLOptions

Represents the options for printing using the EPL (Eltron Programming Language) commands.

| Prop          | Type                | Description                                                       |
| ------------- | ------------------- | ----------------------------------------------------------------- |
| **`name`**    | <code>string</code> | The name of the printer to use.                                   |
| **`address`** | <code>string</code> | The network address, device ID, or connection URL of the printer. |
| **`data`**    | <code>string</code> | The EPL commands to send to the printer for printing.             |


#### PrinterDevices

Represents a collection of printer devices.

| Prop          | Type                         | Description                  |
| ------------- | ---------------------------- | ---------------------------- |
| **`devices`** | <code>PrinterDevice[]</code> | An array of printer devices. |


#### PrinterDevice

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

| Prop          | Type                                             | Description                                                                                                               |
| ------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
| **`name`**    | <code>string</code>                              | The name or model of the printer device.                                                                                  |
| **`address`** | <code>string</code>                              | The network address, device ID, or connection URL of the printer.                                                         |
| **`port`**    | <code>'USB' \| 'NET' \| 'BT' \| 'Browser'</code> | The port protocol used to communicate with the printer. Should be one of "USB", "NET", "BT" (for Bluetooth), or "Browser" |

</docgen-api>

---
_Source: https://npm.io/package/@uniquedj95/label-printer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
