Hello, somebody has print to a printer from Ruby???
I thought a library called Etch for printing, but it doesn't have any
documentation :s
Regards,
···
--
Posted via http://www.ruby-forum.com/.
Hello, somebody has print to a printer from Ruby???
I thought a library called Etch for printing, but it doesn't have any
documentation :s
Regards,
--
Posted via http://www.ruby-forum.com/.
Edgar Gonzalez wrote:
Hello, somebody has print to a printer from Ruby???
I thought a library called Etch for printing, but it doesn't have any
documentation :sRegards,
Nobody knows???
--
Posted via http://www.ruby-forum.com/\.
It depends on your OS for one thing. I'm not aware of a project that
provides a uniform cross-platform API to printing for ruby (that
doesn't mean there isn't one). The closest thing I know of is
Gtk::PrintOperation from ruby-gtk [ http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3APrintOperation
].
HTH,
Jordan
On Nov 30, 9:55 pm, Edgar Gonzalez <edgaralfo...@gmail.com> wrote:
Edgar Gonzalez wrote:
> Hello, somebody has print to a printer from Ruby???> I thought a library called Etch for printing, but it doesn't have any
> documentation :s> Regards,
Nobody knows???
--
Posted viahttp://www.ruby-forum.com/.
Jordan Callicoat wrote:
On Nov 30, 9:55 pm, Edgar Gonzalez <edgaralfo...@gmail.com> wrote:
Posted viahttp://www.ruby-forum.com/.
It depends on your OS for one thing. I'm not aware of a project that
provides a uniform cross-platform API to printing for ruby (that
doesn't mean there isn't one). The closest thing I know of is
Gtk::PrintOperation from ruby-gtk [
http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3APrintOperation
].HTH,
Jordan
Well i am in windows, how could i do that?
--
Posted via http://www.ruby-forum.com/\.
I'm not sure. I assume you could use the win32ole module that ships
with ruby 1.8 [1], or perhaps one of the third-party win32 modules
[2]. But I have no idea how. Maybe someone who knows about ruby +
win32 can help (Daniel Berger?). You could also probably write a
little C extension to call the windows API, but that may be more work
than necessary. Sorry I can't be of more help.
[1] http://www.ruby-doc.org/core/classes/WIN32OLE.html
[2] http://raa.ruby-lang.org/cat.rhtml?category_major=Library;category_minor=Win32
Regards,
Jordan
On Dec 1, 12:47 am, Edgar Gonzalez <edgaralfo...@gmail.com> wrote:
Jordan Callicoat wrote:
> On Nov 30, 9:55 pm, Edgar Gonzalez <edgaralfo...@gmail.com> wrote:
>> Posted viahttp://www.ruby-forum.com/.
> It depends on your OS for one thing. I'm not aware of a project that
> provides a uniform cross-platform API to printing for ruby (that
> doesn't mean there isn't one). The closest thing I know of is
> Gtk::PrintOperation from ruby-gtk [
>http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3APrintOperation
> ].> HTH,
> JordanWell i am in windows, how could i do that?
--
Posted viahttp://www.ruby-forum.com/.
You can open file 'PRN:' (note the double colon). That should provide
you with a line printer
(i.e. no graphics, just ascii output). I'm not sure whether it is
still supported.
Other than that, I guess the easiest way would be to create pdf
somehow and print that,
either using some command line tool, or Win32API/Win32OLE.
See 'system' and printing in Windows - Ruby - Ruby-Forum for some hints.
On Dec 1, 2007 7:47 AM, Edgar Gonzalez <edgaralfonzo@gmail.com> wrote:
Jordan Callicoat wrote:
> On Nov 30, 9:55 pm, Edgar Gonzalez <edgaralfo...@gmail.com> wrote:
>> Posted viahttp://www.ruby-forum.com/.
> It depends on your OS for one thing. I'm not aware of a project that
> provides a uniform cross-platform API to printing for ruby (that
> doesn't mean there isn't one). The closest thing I know of is
> Gtk::PrintOperation from ruby-gtk [
> http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3APrintOperation
> ].
>
> HTH,
> JordanWell i am in windows, how could i do that?