I am using javascript window.print(); to print web-page. On printout, it is showing url like http:\...
How i could avoid it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t control this in javascript, it has to be done at the browser level.
This post explains how to do it in Firefox and IE
http://www.howtogeek.com/howto/the-geek-blog/prevent-firefox-or-internet-explorer-from-printing-the-url-on-every-page/
What we have done in the past is just have a link explaining to the user how to do this for their browser.
EDIT
What we’ve also done is generate a PDF so that you can make the page look the same across all browsers. iTextSharp is a free tool to do this. Just a note, it is kinda unfriendly. There is an example here. Basically, you input HTML and it converts it to a PDF.