I want to written function to all kind of screenshots and prints. Now I want to write function for right click and print in Angular. If anyone knows to crack that do let me know. Sample code is as below
document.addEventListener('keydown', (e) => {
if (e.ctrlKey && e.key == 'p') {
// console.log("tried to print")
// alert('This section is not allowed to print or export to PDF');
this.prtScrEvent("Screenshot");
}
});
//prtsc key press
window.addEventListener("keyup", (e) => {
if (e.keyCode == 44) {
// console.log("printing tried");
// alert("The 'print screen' key is pressed");
this.prtScrEvent("Screenshot");
}
});
async prtScrEvent(status) {....}