?
Solved

Print a cover page.

Posted on 2005-03-30
4
Medium Priority
?
148 Views
Last Modified: 2010-04-09
Can I  set up my webpage to print out a "cover page" when someone uses the browser print function?
I don't want the user to see this page, just add it to the "spooler" or whatever, when the document is sent to the printer.

Can this be done?

thanks
cdfllc
0
Comment
Question by:cdfllc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 18

Accepted Solution

by:
bruno earned 1000 total points
ID: 13666592
Yes, using CSS you can do this.

You'll need to use a print stylesheet (see "Print Different" at meyerweb for instruction on this part: http://www.meyerweb.com/eric/articles/webrev/200001.html )

simply at the top of your HTML code do this:

<div class="printonly">
This is the text you want to print, but don't want on the screen
</div>


in your normal stylesheet, you set that class to not display...

.printonly {
    display: none;
}


in your print stylesheet, you set it to display:


.printonly {
    display: block;
}



let me know if you have questions...


 bruno
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 13666649
pssst Bruno... page-break-after:always for the cover page?

Cd&

0
 
LVL 18

Expert Comment

by:bruno
ID: 13666709
oh, i guess if it's to be a true page on it's own, sure.  :-)


cdfllc,

*ahem* if you want it to be a page on it's own, add page-break-after:always to the CSS...

.printonly {
    display: block;
    page-break-after:always
}
0
 
LVL 18

Expert Comment

by:bruno
ID: 13673537
glad i could help!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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 the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

801 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