Solved

HTML Printing

Posted on 2014-01-23
5
216 Views
Last Modified: 2014-01-25
Hello Experts,

I am now printing a document using the following code, but is there any way I can remove the header and footer that usually are printed like time, date and URL. I know that this is a browser settings, but can I do it by code?

<BODY onload="window.print(); window.close();">

Open in new window

0
Comment
Question by:APD_Toronto
  • 3
5 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39805156
Hi,
as far as I know - No - this is not possible.
That what be a huge security risk/impact if you could change browser settings through Javascript.

HTH
Rainer
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39805173
To confirm there is no cross browser method of doing this.
Your best option is to create a pdf of the page and then you won't have this.
0
 

Author Comment

by:APD_Toronto
ID: 39805191
I thought so.

I have abc pdf, which I have not used in years, was 800 pixels a good width when converting to pdf, or am I imagining this number?
0
 
LVL 58

Expert Comment

by:Gary
ID: 39805216
I don't know ABC PDF but if it has a simple HTML to PDF option with an option to fit to A4 then just use that. Or just do a convert and let the user scale the print if needed.
Screen and print are different beasts when printing,
0
 
LVL 58

Expert Comment

by:Gary
ID: 39805224
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question