Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 141307

Trigger a keypress event manually for a combination like Ctrl+P in angular/javascript

$
0
0

How to trigger a keypress event manually for a combination like Ctrl+P in angular/javascript?

I have tried using the window.print() method. But unfortunately, I have some css styles to be applied for the document to be printed in the @media print{} in css. The same style gets applied to the parent page as the one in print window.

Issue doesnot occur when clicking ctrl+p. The print window has seperate styles applied, different from the original page in this case.


Viewing all articles
Browse latest Browse all 141307

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>