Printing through Ruby

S

Sabyasachi Mustafi

Some days ago there were some threads about printing through ruby. Here is =
my bad solution. As I expect to make print outs in a easy but feature rich=
ed process as in Visual Basic 6.0 =0AVery frankly speaking that I want to l=
ove Ruby but always I compare it with the fast programming experience in Vi=
sual Basic. I hope it will not take too much time to get a Ruby IDE =0AI ma=
de a simple thing in ruby for printing to the printer.=0AMake the output in=
a file and then print it.=0A=0App=3DFile.open('C:\test.doc','w')=0App.pri=
nt "hello print"=0App.close=0Asystem('D:\Program Files\Microsoft Office\Off=
ice10\Winword "C:\test.doc"')=0A=0AIt works fine in Windows or Linux with t=
he "system".=0ABut I don't know if there is any other simple solution. Actu=
ally I need to make a report, so there are some formatted text, also differ=
ent sizes of paper etc. Any other solution for this?=0A=0ARegards,=0ASabyas=
achi Mustafi=0A
 
A

Armin Roehrl

Sabyasachi said:
Some days ago there were some threads about printing through ruby. Here is =
my bad solution. As I expect to make print outs in a easy but feature rich=
ed process as in Visual Basic 6.0 =0AVery frankly speaking that I want to l=
ove Ruby but always I compare it with the fast programming experience in Vi=
sual Basic. I hope it will not take too much time to get a Ruby IDE =0AI ma=
de a simple thing in ruby for printing to the printer.=0AMake the output in=
a file and then print it.=0A=0App=3DFile.open('C:\test.doc','w')=0App.pri=
nt "hello print"=0App.close=0Asystem('D:\Program Files\Microsoft Office\Off=
ice10\Winword "C:\test.doc"')=0A=0AIt
As long as you stick with Windows (sic), VRuby has an example
printer.rb that you might
want to look at.

good luck, -A
 
J

Jamey Cribbs

Sabyasachi said:
Some days ago there were some threads about printing through ruby. Here is =
my bad solution. As I expect to make print outs in a easy but feature rich=
Check out Rpv (www.rpvreport.com). I use it a lot in my Python and Ruby
gui apps to replace the functionality of a Crystal Reports. It cost me
a one time fee of approx $40 and I get to distribute the Rpv runtime in
my reports royalty-free.

Jamey

Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top