Skip to content

Instantly share code, notes, and snippets.

@m87carlson
Created February 10, 2016 16:47
Show Gist options
  • Save m87carlson/fbb804e3c2c3aa1a530f to your computer and use it in GitHub Desktop.
Save m87carlson/fbb804e3c2c3aa1a530f to your computer and use it in GitHub Desktop.
Cups and Ruby
require 'cupsffi'
remote_printers = CupsPrinter.get_all_printer_names(:hostname => 'print.example.com')
printer = CupsPrinter.new(remote_printers.last, :hostname => 'print.example.com')
job = printer.print_data('hello printer', 'text/plain')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment