use escpos::printer::Printer; use escpos::utils::*; use escpos::{driver::*, errors::Result}; fn main() -> Result<()> { env_logger::init(); // let driver = NetworkDriver::open("192.168.1.248", 9100, None)?; let driver = ConsoleDriver::open(true); Printer::new(driver, Protocol::default(), None) .debug_mode(Some(DebugMode::Dec)) .init()? .smoothing(true)? .bold(true)? .underline(UnderlineMode::Single)? .writeln("Bold underline")? .justify(JustifyMode::CENTER)? .bold(false)? .underline(UnderlineMode::None)? .size(2, 3)? .writeln("Hello world - Normal")? .debug()?; Ok(()) }