Reputation: 2662
I have used a block for adding an option to print the page.The content of the block is
<a onclick='window.print();' style='cursor:pointer'>Print this page</a>
It works fine but I need to customize the content to be printed.How can this be done ?
Upvotes: 3
Views: 1191
Reputation: 173642
You can customize what gets printed and how printed content looks like using media specific CSS:
<style type="text/css" media="print">
h1 { text-align: center }
</style>
Upvotes: 2
Reputation: 2100
Unfortunately you cannot customize window.print(). It will print the focusing window. If you need to customize the print area, then the elements to be printed should be added in a separate window.
For more info visit here
Upvotes: 0