Can someone point me to some documentation on how to use the printer using ruby 1.9.2 or WxRuby? -- Ann Maybury ann.maybury@gmail.com _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
hendra kusuma
2011-May-06 02:23 UTC
[wxruby-users] How do you get a file to the printer using wxRuby?
On Fri, May 6, 2011 at 5:40 AM, Ann Maybury <ann.maybury at gmail.com> 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 -- Suka linux? Kunjungi blog saya http://penguinroad.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20110506/9b023b3a/attachment.html>
Alex Fenton
2011-May-06 05:41 UTC
[wxruby-users] How do you get a file to the printer using wxRuby?
On 05/05/11 22:40, Ann Maybury 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