I would like to be able to manipulate the DOM just before sending my page for printing. Internet Explorer has an event in the window object called "onbeforeprint", but it is proprietary and not supported by other browsers. Can this be done using javascript (specifically jQuery, if possible)?
Before you ask, I cannot easily use the print stylesheet to apply the changes, because the elements I need to change have built-in styles that cannot be overridden by the global stylesheet. I need to override these inline print styles. It should be possible to modify existing jQuery if necessary, however it will be a more time-consuming and risky change.
Cheers zac
source
share