[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: 'system' and printing in Windows

Sam Gentle

10/2/2006 11:00:00 AM

On 10/2/06, Nuralanur@aol.com <Nuralanur@aol.com> wrote:
> Dear all,
> I'd like to give the user the possibility to print some Ruby-generated
> results of
> my programs (this can be PDF, PS, EPS, PNG files, a .doc document, ...) from
> a GUI
> program developed in Ruby.

This can be a little complicated, and might involve all sorts of nutty
winapi calls.

See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-...
for an example of printing plain-text documents.

If you're using more complicated filetypes you may want to consider
using windows' shellexecute function to just run the associated
program's 'print' action.

This has an example of that approach:
http://rubyforge.org/pipermail/fxruby-users/2005-February/0...

Sam