Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 150
  • Last Modified:

Print a cover page.

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
cdfllc
Asked:
cdfllc
  • 3
1 Solution
 
brunoCommented:
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
 
COBOLdinosaurCommented:
pssst Bruno... page-break-after:always for the cover page?

Cd&

0
 
brunoCommented:
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
 
brunoCommented:
glad i could help!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now