ps_dev
ps_dev

Reputation: 69

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

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 does not occur when clicking ctrl+p. The print window has separate styles applied, different from the original page in this case.

Upvotes: 0

Views: 837

Answers (0)

Related Questions