Set printer on

hi all, I’m newbie on ror. My question is:
how could I set the printer on. The logic is as follow:

set printer on

my print stmt to printer

set printer off

thx

If I understand you right you want to be able to access somebodies
printer
remotely from your rails application? As far as I know that can’t be
done,
just image how bad banner ads would be if any web page could control
your
printer…

Rob

You can bring up the printer prompt on the users computer, but I
wouldn’t, except maybe on a specific print friendly page which people
will only go to if they want to print, because the users will just get
annoyed at you otherwise.

-N

On 5/30/06, rails suheimi [email protected] wrote:

how about to local printer ? Say, to usb port or parallel port ? Can
it be done ?
What I’m trying to do is to print the invoice from rails apps.

thx guys

If you’re running on Linux you can create a PDF and send it through
lp, though that requires a printing system that can read PDFs - CUPS
can.

how about to local printer ? Say, to usb port or parallel port ? Can
it be done ?
What I’m trying to do is to print the invoice from rails apps.

thx guys

just create a link/button with onclick=“window.print()”. ex:

Click Me To Print This Page

this will open the print dialog of your browser and allow you to print
to
the current page. of course, the user will have to have javascript
turned
on in the browser for this to work.

now, if you want to do printing directly to a networked printer from the
server, that’s a different topic altogether.

Chris