On Fri, Aug 6, 2010 at 4:59 AM, Colin Law <[email protected]> wrote:
> On 6 August 2010 09:19, sumanta <[email protected]> wrote:
>> Hi,
>>    I am generating some pdf through a for loop. now i want to print
>> those pdf file through program. Any help/suggestion will be
>> appreciated.
>
> Where are you trying to print it?  On the server or on the users PC?
> It is not possible, I think, to force a print on the users PC from a
> web app, the user must do that himself.

On the user's PC you can use javascript to trigger the printing
(window.print) but, as Colin correctly notes, that will present the
user with a printer dialog box, not automatically print the contents
of the page.  At any rate, that's not relevant until you get the pdf
into the user's browser.  To do that you'll probably use send_file
which, iirc, will trigger a dialog that asks the user whether they
want to save or print the file.

HTH,
Bill

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to