I used a block to add an option to print the page. Block content <a onclick='window.print();' style='cursor:pointer'>Print this page</a>
<a onclick='window.print();' style='cursor:pointer'>Print this page</a>
It works great, but I need to customize the content to print. How can this be done?
You can customize what is printed and what the printed content looks like using custom CSS:
<style type="text/css" media="print"> h1 { text-align: center } </style>
Unfortunately, you cannot customize window.print (). It will print the focus window. If you need to customize the print area, then the items to be printed should be added in a separate window.
For more information visit here