Skip to content

About

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

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

36 Commits

Folders and files

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

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages