Control P simulation by code

Please take this post as reference: javascript - how to cancel window.print(); on click on the Print button, Print pop up but no print action - Stack Overflow

You might need to do modification, and this code is required to place in the Custom Code under wix settings. Not your editor code window.