Solved

HTML Printing

Posted on 2014-01-23
5
214 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

810 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