Discussion Forums
- Topic List
- Most Recent Posts
- Sign In for more options
You have two options here. You cannot print from the server side, you can serve the pdf as a download where the user can print it (the selection of a printer is an OS function, not the web app)
link_to "download pdf', send_file('path/to/pdf')
Or you can use javascript to print it if you have it in a hidden div, or iframe:
getElementById("pdf").print();
Hello
I have a PDF file and I want to print it when I click on a button of my rails application. I also want, if it is possible, to be possible the user choose the printer to be used. How can I do that? thanks regards
