Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

customize window.print() in drupal block

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 ?

like image 442
I'm nidhin Avatar asked Jan 22 '26 02:01

I'm nidhin


1 Answers

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>
like image 148
Ja͢ck Avatar answered Jan 23 '26 16:01

Ja͢ck