Print natively on Windows

I would like to be able to print a simple report (text, some lines and
boxes) from a ruby application natively to a printer on a Windows
platform. Can anyone give me guidance on how to do that?

Le 27/12/2013 22:24, Varro a

Varro wrote in post #1131706:

Can anyone give me guidance on how to do that?

Hello,
I used to write my ‘report’ in a HTML file, with an onload handler wich
call print.
Then call system ‘start’, ‘report.html’

One option is to use a gem to write a PDF file, then use acrobat
reader’s command line print option with the default printer.

Joel P. wrote:

One option is to use a gem to write a PDF file, then use acrobat
reader’s command line print option with the default printer.

That’s what I’m doing now, but it means that when I request a print
job, a copy of acrobat pops up to do the actual printing. This looks
unprofessional, hence my seeking a way to print natively, rather than
relying on another application to do the actual printing.

(Other responders mentioned outputting HTML and relying on the browser
to print, but that has the same objection, and is even worse, since
one doesn’t have the exact control of the output than one has with
outputting a PDF file.)

Joel P. wrote:

That’s more of a flaw of Adobe in lacking an “invisible” option. Any
chance of adding a command-line PDF printer?

I wouldn’t know how to write one myself, and I don’t want my users to
have to install a third-party application to use my software.

I was thinking small, portable, command-line only or a gem. Still, I
haven’t done any proper research on it, just an idea.

On Sat, Dec 28, 2013 at 4:11 PM, Joel P. [email protected]
wrote:

I was thinking small, portable, command-line only or a gem. Still, I
haven’t done any proper research on it, just an idea.

Oh, my I just saw one yesterday, let me see if I can find it again. It
looks like it produces output that looks rather like MySQL’s tty output
in
boxes.

That’s more of a flaw of Adobe in lacking an “invisible” option. Any
chance of adding a command-line PDF printer?

On Sat, Dec 28, 2013 at 6:24 PM, tamouse pontiki
[email protected]wrote:

Okay, my apologies, what I saw was this
https://github.com/cldwalker/hirbwhich a formatter for IRB. Perhaps
you could glean something from it,
though.