1use escpos_rust::{Printer, PrinterProfile, command::Font};
2
3fn main() {
4 let printer_profile = PrinterProfile::terminal_builder().with_font_width(Font::FontA, 20).build();
5 let printer = match Printer::new(printer_profile) {
7 Ok(maybe_printer) => match maybe_printer {
8 Some(printer) => printer,
9 None => panic!("No printer was found :(")
10 },
11 Err(e) => panic!("Error: {}", e)
12 };
13
14 match printer.println("Hello, world!") {
16 Ok(_) => (),
17 Err(e) => println!("Error: {}", e)
18 }
19}