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.
Thanks in advance.
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.
Thanks in advance.
On 06 Aug 2010, at 10:19, sumanta wrote:
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.
Best regards
Peter De Berdt
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.
Colin
On Fri, Aug 6, 2010 at 4:59 AM, Colin L. [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
Bill W. wrote:
[…]
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.
I think that would be browser-specific. Wouldn’t send_file just make
the browser act the same way it would when it received a static PDF
file?
HTH,
Bill
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
On Fri, Aug 6, 2010 at 9:09 AM, Marnen Laibow-Koser
[email protected] wrote:
Bill W. wrote:
[…]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.I think that would be browser-specific. Wouldn’t send_file just make
the browser act the same way it would when it received a static PDF
file?
Yes it would. And 1) you’re right - the options probably are
browser-specific, and 2) the options I was thinking of are save or
open, not save or print. And further, the javascript option wouldn’t
work either since the pdf would either replace what was in the window,
open a new one, or open the file in Reader. My bad. Responding
before caffeine kicks in is dangerous ;-(
Best regards,
Bill
Bill W. wrote:
On Fri, Aug 6, 2010 at 9:09 AM, Marnen Laibow-Koser
[email protected] wrote:Bill W. wrote:
[…]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.I think that would be browser-specific. �Wouldn’t send_file just make
the browser act the same way it would when it received a static PDF
file?Yes it would. And 1) you’re right - the options probably are
browser-specific, and 2) the options I was thinking of are save or
open, not save or print. And further, the javascript option wouldn’t
work either since the pdf would either replace what was in the window,
open a new one, or open the file in Reader. My bad. Responding
before caffeine kicks in is dangerous ;-(
Understood. Next time wait till before the caffeine kicks in before
posting to the list.
Best regards,
Bill
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs