I have a problem in my project that i open a dynamically generated PDF file in popup window which working correctly. But now i want to print that pdf directly when popup is open at client side printer, how can i solved it ??
I need help of yours. Please suggest me some code for this.
You need to open the popup with javascript and the fire the print()
function on it.
var opts = 'width=700,height=500,toolbar=0,menubar=0,location=1,status=1,scrollbars=1,resizable=1,left=0,top=0';
var newWindow = window.open(yourUrl,'name',opts);
newWindow.print();
Note that the url you open must be in the same domain as your current page for this to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With