Take the 2-minute tour ×

Hi i want to remove the URL that gets printed on the bottom of the page.



How can it be omitted or prevent from getting printed?

To be more specific, is there any way I can prevent the page URL, date and the page title being printed along, while printing the web page?

share|improve this question
Can that be done programatically? Its really a browser page setup! –  Shoban Feb 25 '09 at 9:12
Totally a 'browser page setup' thing. But I found this tutorial a bit helpful for print page CSS. –  Mayeenul Islam Dec 30 '12 at 10:22
add comment

9 Answers

Having the URL show is a browser client preference, not accessible to scripts running within the page (let's face it, a page can't silently print themselves, either).


share|improve this answer
+1 for that :) and the POST tip –  Shoban Feb 25 '09 at 9:24
noooo ... POST is not an encryption mechanism - it's a hint about the possible side effects of the request. –  troelskn Feb 25 '09 at 9:36
Instead of printhing a long multi line query string. I woul be happy to print just the url –  Shoban Feb 25 '09 at 9:42
the query string is part of the url. if the url is too long, you should fix that instead. –  troelskn Feb 25 '09 at 11:17
I didn't say it was an encryption thing -- it does remove the query parameters from the URL, which was a requested mitigation factor –  Rowland Shaw Feb 25 '09 at 12:25
add comment

I do not know if you are talking about a footer within your actual graphic or the url the print process within the browser is doing.

If its the url the print process is doing its really up to the browser if he has a feature to turn that off.

If its the footer information i would recommend using a print stylesheet and within that stylesheet to do

display: none;

For the particular ID or class of the footer.

To do a print stylesheet, you need to add this to the head.

share|improve this answer
add comment

You can remove the url dispalying on the printed document via your browser settings.You just click file->page setup->header and footer set all things as blank.if you hav ie,you just remove &U from footer textbox.hopefully this will help you

share|improve this answer
add comment

Following code sample will work for you,

        size: auto;   /* auto is the initial value */
        margin: 0mm;  /* this affects the margin in the printer settings */

see the answer on Disabling browser print options (headers, footers, margins) from page?

and specification of the @page

share|improve this answer
On Firefox 20.0 this doesn't remove URL from Print Preview –  sindikat May 26 '13 at 7:05
add comment

I am telling you about Mozilla Firefox ( I hope it should be same way in other browsers also). CLick on Firefox menu , Go to Print , Select Page Set Up from sub menu of Print. A pop will come up on your screen, there go to "Margin & Header /Footer" tab.

In that select "BLANK" for header / footer as per requirement before printing. You can check the preview for confirmation.

I hope this will help.

-- Cheers Mitravind Garg, India

share|improve this answer
add comment

I would agree with most of the answers saying that its a browser settings but still you can achieve what you want via COM. Keep in mind that most browsers will still have issue with that and even IE will raise the COM security bar to users. So unless its not something you are offering within organisation, don't do it.

share|improve this answer
add comment

I have the same problem. I wonder if it is possible to create the HTML for printing via a jquery plugin: http://www.recoding.it/?p=138

Then send the HTML to a php script (using an ajax call), generate a pdf with http://www.xhtml2pdf.com/ or http://code.google.com/p/wkhtmltopdf/.

Afterwards the pdf could be displayed (by setting the appropriate content type and direct rendering) or displayed by a http-Redirect to the generated pdf.

The generated pdfs in the pfd_for_printing-folder could act as cache and be deleted by a job once a day.

share|improve this answer
add comment

Perhaps you could try chrome (Probably Safari also)

The url & the page number in the header & footer is not visible when I print to pdf on OSX with Google Chrome.

Sorry not sure if this applies to windows

share|improve this answer
add comment

Well, i searched all the way up and down because i needed the answer for me and my projects, and came to a conclusion that, actualy no matter what information you show in the url adress its up to:

if (!$_SESSION["valid_user"]) 

So even if someone just type the exact adress from your printed page he would get .... Login page :)

share|improve this answer
add comment

Your Answer

