-
-
Save i5okie/6d76cddf785c783d1523 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ruby app.rb 1 ↵ | |
[ESCPER] [open] ============ | |
[ESCPER] [open] Trying to open Printer 1 USB@/dev/tty.usbserial-AH032WJM@9600bps ... | |
[ESCPER] [open] Path /dev/tty.usbserial-AH032WJM is not in IP:port format. Not trying to open printer as TCPSocket. | |
[ESCPER] [open] Failed to open as SerialPort: #<NameError: uninitialized constant Escper::Printer::SerialPort> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'escper' | |
vp1 = Escper::VendorPrinter.new :id => 1, :name => 'Printer 1 USB', :path => '/dev/tty.usbserial-AH032WJM', :copies => 1 | |
pengine = Escper::Printer.new 'local', vp1 | |
pengine.open | |
pengine.print 1, 'testing print' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment