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-talk/32861
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/000199.html

Sam