1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! Get system printers and create and manage print jobs in Windows or Unix.
//!
//! Printers is a simple lib to call printers apis for unix *(cups)* and windows *(winspool)* systems and can provide a list of available printers, send print jobs and manage they
//!
//!```rust,no_run
//! use printers::{
//! common::{
//! base::job::PrinterJobOptions,
//! converters::{
//! Converter,
//! GhostscriptConverterOptions,
//! },
//! },
//! get_printer_by_name,
//! get_default_printer,
//! get_printers
//! };
//!
//! // Iterate all available printers
//! for printer in get_printers() {
//! println!("{:?}", printer);
//! }
//!
//! // Get a printer by the name
//! let my_printer = get_printer_by_name("my_printer");
//! if my_printer.is_some() {
//! let _job_id = my_printer.unwrap().print_file("notes.txt", PrinterJobOptions::none());
//! // Err("...") or Ok(())
//! }
//!
//! // Use the default printer
//! let default_printer = get_default_printer();
//! if default_printer.is_some() {
//! let _job_id = default_printer.unwrap().print(b"hello world", PrinterJobOptions {
//! name: None,
//! raw_properties: &[
//! ("document-format", "application/vnd.cups-raw"),
//! ("copies", "2"),
//! ],
//! converter: Converter::Ghostscript(GhostscriptConverterOptions::ps2write()),
//! });
//! // Err("...") or Ok(())
//! }
//!
//! ```
;
use ;
/**
* Return all available printers on a system
*/
/**
* If you know the printer name, you can try to get the printer directly
*/
/**
* Return the default system printer
*/