Solved

HTML Printing

Posted on 2014-01-23
5
211 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now