# lpapi-plugin

LPAPI

## Install

```bash
npm install lpapi-plugin
npx cap sync
```

## API

<docgen-index>

* [`getPairedPrinters()`](#getpairedprinters)
* [`connectPrinter(...)`](#connectprinter)
* [`disconnectPrinter()`](#disconnectprinter)
* [`printText(...)`](#printtext)
* [`printText1DBarcode(...)`](#printtext1dbarcode)
* [`drawText(...)`](#drawtext)
* [`drawText1DBarcode(...)`](#drawtext1dbarcode)
* [`getPrinterState()`](#getprinterstate)
* [`drawCircle(...)`](#drawcircle)
* [`drawRect(...)`](#drawrect)
* [`drawLine(...)`](#drawline)
* [`startJob(...)`](#startjob)
* [`abortJob()`](#abortjob)
* [`commitJob()`](#commitjob)
* [Interfaces](#interfaces)

</docgen-index>

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

### getPairedPrinters()

```typescript
getPairedPrinters() => Promise<any>
```

**Returns:** <code>Promise&lt;any&gt;</code>

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


### connectPrinter(...)

```typescript
connectPrinter(options: PrinterAddress) => Promise<any>
```

| Param         | Type                                                      |
| ------------- | --------------------------------------------------------- |
| **`options`** | <code><a href="#printeraddress">PrinterAddress</a></code> |

**Returns:** <code>Promise&lt;any&gt;</code>

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


### disconnectPrinter()

```typescript
disconnectPrinter() => Promise<any>
```

**Returns:** <code>Promise&lt;any&gt;</code>

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


### printText(...)

```typescript
printText(options: PrinterOptions) => Promise<any>
```

| Param         | Type                                                      |
| ------------- | --------------------------------------------------------- |
| **`options`** | <code><a href="#printeroptions">PrinterOptions</a></code> |

**Returns:** <code>Promise&lt;any&gt;</code>

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


### printText1DBarcode(...)

```typescript
printText1DBarcode(options: PrinterOptions) => Promise<any>
```

| Param         | Type                                                      |
| ------------- | --------------------------------------------------------- |
| **`options`** | <code><a href="#printeroptions">PrinterOptions</a></code> |

**Returns:** <code>Promise&lt;any&gt;</code>

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


### drawText(...)

```typescript
drawText(options: TextOptions) => Promise<any>
```

| Param         | Type                                                |
| ------------- | --------------------------------------------------- |
| **`options`** | <code><a href="#textoptions">TextOptions</a></code> |

**Returns:** <code>Promise&lt;any&gt;</code>

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


### drawText1DBarcode(...)

```typescript
drawText1DBarcode(options: TextOptions) => Promise<any>
```

| Param         | Type                                                |
| ------------- | --------------------------------------------------- |
| **`options`** | <code><a href="#textoptions">TextOptions</a></code> |

**Returns:** <code>Promise&lt;any&gt;</code>

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


### getPrinterState()

```typescript
getPrinterState() => Promise<any>
```

**Returns:** <code>Promise&lt;any&gt;</code>

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


### drawCircle(...)

```typescript
drawCircle(options: ShapeOptions) => Promise<any>
```

| Param         | Type                                                  |
| ------------- | ----------------------------------------------------- |
| **`options`** | <code><a href="#shapeoptions">ShapeOptions</a></code> |

**Returns:** <code>Promise&lt;any&gt;</code>

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


### drawRect(...)

```typescript
drawRect(options: ShapeOptions) => Promise<any>
```

| Param         | Type                                                  |
| ------------- | ----------------------------------------------------- |
| **`options`** | <code><a href="#shapeoptions">ShapeOptions</a></code> |

**Returns:** <code>Promise&lt;any&gt;</code>

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


### drawLine(...)

```typescript
drawLine(options: ShapeOptions) => Promise<any>
```

| Param         | Type                                                  |
| ------------- | ----------------------------------------------------- |
| **`options`** | <code><a href="#shapeoptions">ShapeOptions</a></code> |

**Returns:** <code>Promise&lt;any&gt;</code>

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


### startJob(...)

```typescript
startJob(option: LabelOptions) => Promise<any>
```

| Param        | Type                                                  |
| ------------ | ----------------------------------------------------- |
| **`option`** | <code><a href="#labeloptions">LabelOptions</a></code> |

**Returns:** <code>Promise&lt;any&gt;</code>

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


### abortJob()

```typescript
abortJob() => Promise<any>
```

**Returns:** <code>Promise&lt;any&gt;</code>

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


### commitJob()

```typescript
commitJob() => Promise<any>
```

**Returns:** <code>Promise&lt;any&gt;</code>

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


### Interfaces


#### PrinterAddress

| Prop          | Type                |
| ------------- | ------------------- |
| **`name`**    | <code>string</code> |
| **`address`** | <code>string</code> |


#### PrinterOptions


#### TextOptions

| Prop             | Type                |
| ---------------- | ------------------- |
| **`text`**       | <code>string</code> |
| **`x`**          | <code>number</code> |
| **`y`**          | <code>number</code> |
| **`width`**      | <code>number</code> |
| **`height`**     | <code>number</code> |
| **`textHeight`** | <code>number</code> |


#### ShapeOptions

| Prop     | Type                |
| -------- | ------------------- |
| **`v`**  | <code>number</code> |
| **`v1`** | <code>number</code> |
| **`v2`** | <code>number</code> |
| **`v3`** | <code>number</code> |
| **`v4`** | <code>number</code> |


#### LabelOptions

| Prop              | Type                |
| ----------------- | ------------------- |
| **`labelWidth`**  | <code>number</code> |
| **`labelHeight`** | <code>number</code> |

</docgen-api>
