Skip to content
cmowforth edited this page Sep 13, 2010 · 8 revisions

Ruby wrapper for the common UNIX printing system API.

I’ve found what I’ve developed so far to compile and run on OS X 10.5 with Ruby 1.9.0. YMMV.

Basic Usage

A few singleton methods:


require "cups"

Cups.default_printer
Cups.show_destinations
Cups.jobs_on(printer)
Cups.options_for(printer)

To actually print things, we have a PrintJob class:


require "cups"

pj = Cups::PrintJob.new("/path/to/file")

pj.print
pj.job_id
pj.cancel

Clone this wiki locally