Forum Moderators: open

Message Too Old, No Replies

Print Detection

         

nickCR

12:59 am on Mar 19, 2010 (gmt 0)

10+ Year Member



Hello All,

I am curious to know if there is anyway to change what is printed when a user goes to file -> print or clicks the icon?

I would like to add a graphic to the background. I was thinking maybe a print action listener and then when it's activated the background image is changed.

Have any of you had to do this and if so what solution did you find worked best?

Regards,

Nick

Dijkgraaf

2:26 am on Mar 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why don't you use style sheets and use the media tag?

<style type="text/css" media="all">
@import "mystyle.css";
</style>

<link rel="stylesheet"
type="text/css"
media="print" href="print.css" />

Fotiman

4:07 am on Mar 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Note, most browsers will not print background images by default. The user has to explicitly configure his/her browser to print background images in order for them to print.