Project

win_print

0.0
No commit activity in last 3 years
No release in over 3 years
The WinPrint library offers a way to send raw data to a system printer on windows. It also allows to fetch the printer list.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.16
>= 0
 Project Readme

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