You need to sign in to do that
Don't have an account?

Javascript to print without header and footer information
Hi All,
I want to print a report(visualforce page) by using window.print().In printed page,it prints some extra information like header as URL and Footer as page information and date information.I don't wamt to print these extra information.How can i hide header and footer from printed page.
Please reply me as soon as possible It's very urgent for my project.
Thanks & Regards,
Brijesh Baser
Window.print() function prints complete web page, but when we need to print the content of VF page only then we first need to get the IFrame Id of the VF page, then need to make small changes in our code to print IFrame content only.
First we need to find the Iframe id dynamically using
window.frameElement.id
Then we need to make few changes in our JavaScript code as...
<script> function iprint(ptarget) { ptarget.focus(); ptarget.print(); } </script>
Hope this helps.
Thanks,
Satgur
you can do with the help of CSS , before print set the CSS of the page .
IF you are asking about browser specific settings like print date and time , then i think it is not possible through code.