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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060527/4feb1d5c/attachment.html
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 On 5/27/06, rails suheimi <rails.suheimi@gmail.com> wrote:> > 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 > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- c++: the power, elegance and simplicity of a hand grenade http://www.migrob.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060527/91c8bd0a/attachment-0001.html
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. <body onload="print()"> -N On 27/05/06, Rob Merrell <robholio@gmail.com> wrote:> 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 > > > On 5/27/06, rails suheimi <rails.suheimi@gmail.com> wrote: > > > > 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 > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > c++: the power, elegance and simplicity of a hand grenade > http://www.migrob.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
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
On 5/30/06, rails suheimi <rails.suheimi@gmail.com> 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 guysIf 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. -- Phillip Hutchings http://www.sitharus.com/
just create a link/button with onclick="window.print()". ex: <a href="#" onclick="window.print()">Click Me To Print This Page</a> 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 On 5/29/06, rails suheimi <rails.suheimi@gmail.com> 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 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060530/1c97c145/attachment.html