8000 GitHub - yusent/pos-printer: Ruby library for printing using ESC/POS (thermal) printers.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yusent/pos-printer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gem Version

pos-printer

Ruby library for printing using ESC/POS (thermal) printers using CUPS.

Install

Add the following line to Gemfile:

gem 'pos-printer'

and run bundle install from your shell.

To install the gem manually from your shell, run:

gem install pos-printer

Usage

require 'pos-printer'

POS::Printer.print('my-printer-name-on-cups') do |p|
  p.align_center
  p.print_logo
  p.big_font
  p.text 'MY HEADER'
  p.align_left
  p.small_font
  p.text 'some body'
end

You may also specify extra options to pass to lp:

require 'pos-printer'

POS::Printer.print('my-printer-name-on-cups', lp_options: ['-h', 'somehost:port']) do |p|
  # Your printing code
end

More Information

About

Ruby library for printing using ESC/POS (thermal) printers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0