tauri-plugin-thermal-printer 1.0.1 → 1.1.0
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/README.md +8 -6
- package/dist-js/index.d.ts +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -201,7 +201,7 @@ on package.json
|
|
|
201
201
|
|
|
202
202
|
```json
|
|
203
203
|
"dependencies": {
|
|
204
|
-
"tauri-plugin-thermal-printer
|
|
204
|
+
"tauri-plugin-thermal-printer": "file:../tauri-plugin-thermal-printer"
|
|
205
205
|
}
|
|
206
206
|
```
|
|
207
207
|
|
|
@@ -213,7 +213,7 @@ Get all printers available in the system. It just lists the configured printers.
|
|
|
213
213
|
|
|
214
214
|
#### Request:
|
|
215
215
|
```typescript
|
|
216
|
-
import { list_thermal_printers } from "tauri-plugin-thermal-printer
|
|
216
|
+
import { list_thermal_printers } from "tauri-plugin-thermal-printer";
|
|
217
217
|
|
|
218
218
|
const response = await list_thermal_printers();
|
|
219
219
|
```
|
|
@@ -250,7 +250,7 @@ Send a print test to a specific printer to verify functionality.
|
|
|
250
250
|
|
|
251
251
|
#### Request:
|
|
252
252
|
```typescript
|
|
253
|
-
import { test_thermal_printer, type TestPrintRequest } from "tauri-plugin-thermal-printer
|
|
253
|
+
import { test_thermal_printer, type TestPrintRequest } from "tauri-plugin-thermal-printer";
|
|
254
254
|
|
|
255
255
|
const response = await test_thermal_printer({
|
|
256
256
|
"printer_info": {
|
|
@@ -319,7 +319,7 @@ Print a personalized document with the specified sections.
|
|
|
319
319
|
|
|
320
320
|
#### Request:
|
|
321
321
|
```typescript
|
|
322
|
-
import { print_thermal_printer, type PrintJobRequest } from "tauri-plugin-thermal-printer
|
|
322
|
+
import { print_thermal_printer, type PrintJobRequest } from "tauri-plugin-thermal-printer";
|
|
323
323
|
|
|
324
324
|
const response = await print_thermal_printer({
|
|
325
325
|
"printer": "TM-T20II",
|
|
@@ -582,7 +582,8 @@ Prints a barcode.
|
|
|
582
582
|
"barcode_type": "CODE128",
|
|
583
583
|
"width": 2,
|
|
584
584
|
"height": 100,
|
|
585
|
-
"text_position": "below"
|
|
585
|
+
"text_position": "below",
|
|
586
|
+
"align": "center"
|
|
586
587
|
}
|
|
587
588
|
}
|
|
588
589
|
```
|
|
@@ -592,6 +593,7 @@ Prints a barcode.
|
|
|
592
593
|
- `width` (number, required): Module width
|
|
593
594
|
- `height` (number, required): Height in dots
|
|
594
595
|
- `text_position` (string, required): Text position ("not_printed", "above", "below", "both")
|
|
596
|
+
- `align` (string, optional): Horizontal alignment ("left", "center", "right") (default: current global alignment)
|
|
595
597
|
|
|
596
598
|
##### Table
|
|
597
599
|
Prints a table.
|
|
@@ -769,7 +771,7 @@ This section contains practical examples for different use cases. Each example d
|
|
|
769
771
|
### 🛒 Long Receipt (Supermarket - 80mm)
|
|
770
772
|
|
|
771
773
|
```typescript
|
|
772
|
-
import { print_thermal_printer, type PrintJobRequest } from "tauri-plugin-thermal-printer
|
|
774
|
+
import { print_thermal_printer, type PrintJobRequest } from "tauri-plugin-thermal-printer";
|
|
773
775
|
|
|
774
776
|
const receipt: PrintJobRequest = {
|
|
775
777
|
"printer": "TM-T20II",
|
package/dist-js/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tauri-plugin-thermal-printer",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"author": "luis3132",
|
|
5
5
|
"description": "Plugin for Tauri to send esc/pos commands to thermal_printer",
|
|
6
6
|
"type": "module",
|
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
"typescript": "^5.9.3",
|
|
32
32
|
"tslib": "^2.8.1"
|
|
33
33
|
}
|
|
34
|
-
}
|
|
34
|
+
}
|