Forum: Ruby on Rails Printing pdf documents

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
80cd5d69ab9f98a80d088df4cc1d0c0a?d=identicon&s=25 EdTaupier (Guest)
on 2009-03-30 17:49
(Received via mailing list)
Is it possible to print existing pdf documents (located server side)
directly to a client printer without using a viewer?  Scenario:  I
have a list of reports on page where the client can check which
reports they would like printed.  Ideally, the print command would
send all the selected reports (pdf doc) directly to a printer instead
of having to display the reports in an adobe viewer.  Ideas,
suggestions, hints?

Thanks
91a72b0ad3e43e3ef3a31816667ec694?d=identicon&s=25 bill walton (Guest)
on 2009-03-30 19:06
(Received via mailing list)
Hi Ed,

On Mon, 2009-03-30 at 08:14 -0700, EdTaupier wrote:
> Is it possible to print existing pdf documents (located server side)
> directly to a client printer without using a viewer?

In a word, no.  At least not to my knowledge.  It's a security thing.
Otherwise I could, knowing the address of your printer, mount a DOS
attack against your network.

HTH,
Bill
80cd5d69ab9f98a80d088df4cc1d0c0a?d=identicon&s=25 EdTaupier (Guest)
on 2009-03-30 19:13
(Received via mailing list)
yeah, I understand the network restrictions, etc. so I figured there
wasn't any direct, easy way.  Could it be possible to tie in the
printing of these reports to the standard browser print function?  I
guess the main point of interest for me is to not have to display all
the reports before printing them unless the client wished to do so.

Thanks.
91a72b0ad3e43e3ef3a31816667ec694?d=identicon&s=25 bill walton (Guest)
on 2009-03-30 19:47
(Received via mailing list)
On Mon, 2009-03-30 at 10:12 -0700, EdTaupier wrote:
> yeah, I understand the network restrictions, etc. so I figured there
> wasn't any direct, easy way.  Could it be possible to tie in the
> printing of these reports to the standard browser print function?

<body onload="window.print()">
I
> guess the main point of interest for me is to not have to display all
> the reports before printing them unless the client wished to do so.

The above assumes you'll display each report but display will
automatically invoke printing.  AFAIK, that's as good as it gets.

HTH,
Bill
This topic is locked and can not be replied to.