You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
Rubyonrails-talk,
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
Walter Lee Davis
unread,
Apr 7, 2018, 6:42:00 AM4/7/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
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.