Hi Fredreic,
Greetings from Syncfusion support.
We suggest you to use the below Javascript code to prevent
the print action and after that you can customize the solution as per your
requirement either in Javascript code or by using event callback function.
Kindly check the attached code snippet and sample for your reference.
window.addEventListener('keydown',
function (event) {
if
(event.keyCode === 80 && (event.ctrlKey || event.metaKey) &&
!event.altKey && (!event.shiftKey || window.chrome || window.opera))
{
event.preventDefault();
if
(event.stopImmediatePropagation) {
event.stopImmediatePropagation();
} else {
event.stopPropagation();
}
this.alert("Now display the
pdf")
return;
}
},
true);
|
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SampleC-785835788-1375959088.zip
Please let us know if you have any concerns.
Regards,
Monisha