print for page

Hi sir i want to know how to print the page by using rails.

can you please post the code.

Are you referring to actually sending the page to the printer, or generating a “printer friendly page”?

The answer is different depending on which you were referring.

I referring to actually sending the page to the printer.

can you please send the process of that/.

You will need to use JavaScript or some other client-side library to accomplish that.

Neither Ruby nor Rails have the ability to interface with the user’s printer from the server-side.