Using the window.matchmedia for detecting the print request before and after the print is triggered.