Send pdf on serfer to client printer?

Send pdf on serfer to client printer?

I have a file on my server I want a client machine to print.

I have searched and searched … and have found:

How to convert HTML to PDF

How to display a PDF in a new window.

How to print a window via javascript …

but not how to print to a physical printer (via the standard system dialogs) an invoice or ticket the way many websites do.

Ralph Shnelvar

It's not really a Rails question, but what you need to add to your page is a JavaScript that calls to window.print(); Just that bit, in a script tag, before the closing /body of the page. But that's only going to work in an HTML page, not in the PDF. I don't know / believe you can / get a PDF to "auto-print" like you can a Web page.