How do you get a file to the printer using wxRuby?

Can someone point me to some documentation on how to use the printer
using
ruby 1.9.2 or WxRuby?

On Fri, May 6, 2011 at 5:40 AM, Ann M. [email protected]
wrote:

Can someone point me to some documentation on how to use the printer using
ruby 1.9.2 or WxRuby?

what os do you use?
if it’s linux, simply

system(“lpr”, filename) or raise “lpr failed”

should do the trick

On 05/05/11 22:40, Ann M. wrote:

Can someone point me to some documentation on how to use the printer
using ruby 1.9.2 or WxRuby?

For the content (text, images, geometric figures) that is to be printed,
a printer is a DeviceContext (DC) that is drawn to in the same way that
wxRuby draws to screen. Have a look at the drawing classes (wxDC).

For controlling the printer (choosing which one to use, choosing paper &
orientation) there is a set of Printing classes.
http://wxruby.rubyforge.org/doc/#printing

There is an example in the distribution in samples/printing/printing.rb
which shows both these aspects

alex

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs