1

I am drawing a chart in an HTML5 canvas. When the chart is printed I would like to use "printer friendly" colors. Is there any event that gets triggered, or anything I can add to the media="print" css that will indicate that the page is being printed so that I can re-render the canvas with the correct colors?

I wanted to avoid using a "printer friendly version" button.

brenzy
  • 1,976
  • 11
  • 20
  • Have a look at this question: http://stackoverflow.com/questions/534977/javascript-event-handler-for-print – T. Junghans Mar 18 '12 at 23:20
  • Unfortunately onbeforeprint doesn't work in Chrome, so that won't solve the problem. – brenzy Mar 19 '12 at 01:23
  • Yes, that's the point I'm trying to make. There is no javascript printing event otherwise Google would be using it to print its gmaps. – T. Junghans Mar 19 '12 at 08:28

0 Answers0