Skip to content

mrschuster/win_print

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinPrint Ruby Gem

Ruby gem for raw printing on windows.

The WinPrint library offers a way to send raw data to a system printer on windows. It also allows to fetch the printer list.

Installation

gem install win_print

Example usage

require 'win_print'

# Get array of printer names:
#
WinPrint.get_printer_names
# => ["Microsoft XPS Document Writer", "Microsoft Print to PDF", "Fax"]


# Send raw data to a system printer.
#
# Arguments:
#   printer_name: (String)
#   data: (String) raw data to be sent to the printer
#   job_name: (String) will be displayed e.g. in the printer queue
#
# Note: For data, the encoding matters and the data will be sent as-is to the printer.
# Will raise RuntimeError if something goes wrong.
#
WinPrint.raw_print("Zebra GK420t", "Some raw data.", "Test Job from WinPrint gem")
# => true

Author

Martin Schuster

www.schul-logistik.de

License

MIT