Tauri Plugin Printer
Interface with printers through Powershell
Install
If you are installing from npm and crate.io package registry, make sure the mayor and minor versions for both packages are the same, otherwise, the API may not match.
Crate: https://crates.io/crates/tauri-plugin-printer
Install latest version:
cargo add tauri-plugin-printer
Or add the following to your Cargo.toml for spesific version:
src-tauri/Cargo.toml
[]
= { = "0.5.2" }
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
# or
# or
Usage
First you need to register the core plugin with Tauri:
src-tauri/src/main.rs
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
import from "tauri-plugin-printer";
// get list printers
const list = await
// get printer by id
const list = await
// print pdf file
await
// get all printer jobs
await
// get printer jobs by printer id
await
// get job by id
await
// restart all job
await
// restart job by id
await
// pause all job
await
// pause job by id
await
// resume all job
await
// resume job by id
await
// remove all job
await
// resume job by id
await
Donate
License
Code: (c) 2023 - Present Alfian Lensun.
MIT where applicable.