views:

57

answers:

2

Hello (Prevent website url in print from javascript?)

I am sure some simple solution exists. I have a webapp, and I use a specific css for printing this form, which is working great. However on each paper it always prints the "URL" for the webapp, which I do not want. I am not sure but I suppose it's the browser that automatically includes this and not my webapp since that string does not exist in it at all, and I suppose there is no magic trick for hiding that in the print stylesheet either?

This URL is usually printed in the top center or bottom center/bottom right, it varies depending on browser

Anyway hopefully someone knows, thanks! It sucks! ;)

+3  A: 

You can't control this and it does suck. One way to get around this is to generate a PDF document for printing. Any document that is downloaded and printed from the client machine rather than from within the browser will not have this problem.

RedFilter
I found out it's actually doable in internet explorer, the thing is my clients does not use internet explorer,they use Firefox or Chrome normally, so if anyone knows how to disable this in firefox or chrome or if webkit has some nifty css for hiding it please do tell !
neph
+1  A: 

Programmatically, you can't control this. There are options that control this are part of the specific browser. Therefore, each user would have to change their browser settings to remove the URL from printing. Unfortunate, I know, but the browsers don't let you have that much control over them.

Jared