Forum Moderators: not2easy

Message Too Old, No Replies

'Hiding' webpage url in print

         

Steveuk17

9:13 am on Apr 15, 2004 (gmt 0)

10+ Year Member



Hi,
Im new to the world of style sheets etc and i was just wondering if anyone could give me some advice.

Im currently working on some documents that will be available over the net, and have just finished a print version.
However every time i print the page i get the webpage url being listed on the bottom left hand page.
I was wondering if there was a way of hiding this url so that it doesnt print as it does make my document look rather untidy.

Thanks in advance,

Steve

Stratus42

9:27 am on Apr 15, 2004 (gmt 0)

10+ Year Member



Hi there!

yes there is a way.. but I'm not sure it belongs in this forum.. it's not a programming thing but a browser thing. If you are using Internet Explorer... go into FILE - select PAGE SETUP

There's a bit on the screen that says Headers and Footers - simply remove the stuff you want gone from there.

the crazy codes are described well in the IE help files but here they are for your reference:

Window title &w
Page address (URL) &u
Date in short format (as specified by Regional Settings in Control Panel) &d
Date in long format (as specified by Regional Settings in Control Panel) &D
Time in the format specified by Regional Settings in Control Panel &t
Time in 24-hour format &T
Current page number &p
Total number of pages &P
Right-aligned text (following &b) &b
Centered text (between &b&b) &b&b
A single ampersand (&) &&

Good Luck..

Lana

Romeo

9:30 am on Apr 15, 2004 (gmt 0)

10+ Year Member



Hi Steve,

this seems to be a default setting of your web browser to add the URL-information when printing a HTML document.
You can un-set this somewhere in your local browser, but you can't control the behavior of your visitor's browsers.
If you want full layout control over your documents, you should use other formats than HTML.
A possibility could be to convert your documents into PDF to offer an additional "tidy printing version" of your HTML documents.

Regards,
R.

Steveuk17

9:49 am on Apr 15, 2004 (gmt 0)

10+ Year Member



Thanks for your replies,

unfortunately your solution will only affect what i see rather than what visitors will see.
At the moment im limited to using only html and so converting my document to another format is not possible.

Heres a bit more info that might help;
The documents themselves are part of a much larger java program that allows users to view personal details etc of clients.
The documents are available through a link at the top of the program and 'pop-up' a html page, the page itself has its own print function and the standard IE page look has already been removed so its not possible to print through the browser.

Im pretty sure that i can solve my problem through some java scripts but unfortunately i know nothing about java programming whatsoever :(

Anyway thanks again for your response

Stratus42

9:53 am on Apr 15, 2004 (gmt 0)

10+ Year Member



hey steve,

I'm not sure you can change the default settings on your client's MSIE using javascript... but let me know if you find a way! :-)

may I suggest that you post your documents as PDF's where the print out will be precicely as you envision and there will be no url or anything for any of your viewers?

Lana

TheDoctor

11:59 am on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Steve, welcome to Webmaster World.

When you say "java" do you mean "java" or do you mean "javascript". These are two different things.

  • If you do mean "java", then you need to lok at the code. It's the java program itself that's printing the URL.

  • If you mean "javascript", then this is run in the browser, and the printed page will show whatever the user has set it to include (eg URL and data/time).

Personally, I have my browsers set to print URL and date/time. The web is a dynamic medium, pages change, sometimes daily, and if I print off a page I need to know what and when it was that I printed.

Even if you go the PDF route (which seems like the best bet, from what you've said so far), make sure you date the document.

(You could create a PDF document, BTW, by setting a browser's print layout how you want it, then printing the page to PDFWriter.)

Steveuk17

11:16 am on Apr 16, 2004 (gmt 0)

10+ Year Member



Ok ive decided to give up!
Im pretty sure its not possible to hide the url using css or javascript however is it possible to change the url that prints out?

At the moment when you use the program and access one of the documents, the user gets a page without any toolbars, address bars etc.
So the user has no idea what page they are on (in terms of url).

But when they print out the page, the follwing is displayed:
[localhost.....]

Is there anyway i can change it so it prints something nicer? like the program name.

TheDoctor

11:23 am on Apr 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're using a program to print out the page, then youi need to contact the programmer (or vendor, if it's a third party program).

If you're printing the page via the browser (even if it's via javascript in the browser) then you can't do anything, becaus it's under the user's control.

DrDoc

2:14 pm on Apr 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You cannot change, hide, or otherwise modify the URL that gets printed. It is impossible. Unless the user has changed his/her browser settings to not print the header/footer, the page URL will be printed exactly the way it is. For example, if I wanted to print this page
http://www.webmasterworld.com/editposts.cgi?action=reply&forum=83&discussion=3439
would show up. And, there is nothing whatsoever that Brett could do to change that... You can't even change the font or color.