473,387 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to remove the URL from the printing page?

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?
Aug 28 '14 #1
5 23787
Exequiel
288 256MB
try this code.
Expand|Select|Wrap|Line Numbers
  1. <style type="text/css" media="print">
  2.         @page 
  3.         {
  4.             size: auto;   /* auto is the current printer page size */
  5.             margin: 0mm;  /* this affects the margin in the printer settings */
  6.         }
  7.  
  8.         body 
  9.         {
  10.             background-color:#FFFFFF; 
  11.             border: solid 1px black ;
  12.             margin: 0px;  /* the margin on the content before printing */
  13.        }
  14.     </style>
Aug 28 '14 #2
That is not what I required I am asking that when printing the web page we should not get date,location address and title on the printed page.In every browser while printing date, title,location address on page are getting printed.These are not defined by us it is by default.we can remove these things such that they won't get printed on page by going to browser settings.Every time we can not do this so if any solution with css and html is there please reply.
Aug 28 '14 #3
Rabbit
12,516 Expert Mod 8TB
There is nothing you can do to change the users default settings on how they want to print their document.
Aug 28 '14 #4
Exequiel
288 256MB
its on the settings on your browser. you need to unchecked the headers and footer for you not to print those url etc.
Aug 28 '14 #5
for Firefox 29 and later there is a new solution:

<html moznomarginboxes mozdisallowselectionprint>
Sep 5 '14 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Thomas Miskiewicz | last post by:
Hi! I'm using the page-break-before:auto thing with my IE 6.0.2600.0000 and it works fine. However when I go into printing preview and printing it's showing adding a empty row by the end of...
0
by: geoffhanna | last post by:
I am not referring to the standard PrintDialog. This dialog pops up every time my printdocument.printpage event fires. He only has one button - "Cancel" and contains no other controls I am...
1
by: Marc | last post by:
Hi, I am setting up a orint function that prints the screen area. It is all working except my screen area spans two print pages hwne viewed using a print preview dialogue . I am trying to fnd a...
2
by: jed | last post by:
Hi guys. I have a html page which I want to print. The page simply contains A page/title header, say "Web Printing 101" and some body text. Now I send to a printer and everythings fine. My problem is...
1
by: fastvarun | last post by:
Can anybody help me how to remove url while print out of a page using javascript window.print() plz help me...........................
2
by: Simon | last post by:
Dear reader, In case a report is a sub report the Report Header of the sub report is printed in the report but the Page Header of the sub report will not be printed. This is the same for...
5
by: gotonagle | last post by:
hi all i have one page that generates a report (basically a table ) in ASP.i have a button that prints that page using window.print(). now i want to print that page in landscape mode (by default its...
0
by: pratimapaudel | last post by:
Hi I have created reports in SQL SERVER 2005 Reporting service. But my report is not printing all the columns in one page. It is breaking the columns in two pages. I have tried to set up the...
2
by: winzone | last post by:
Hi All, Now i use the following code to print the data in C# 2005 application. But i face the problem is total page number at the begining of first page. They want to get page number like : Page :...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.