Using mpdf in PHP, open print dialog box in a new tab
₹600 INR
Închis
Data postării: aproape 6 ani în urmă
₹600 INR
Plata la predare
I am creating a report in PHP using mPDF Library. Till now the output is saved as a pdf file which I need to print out manually by opening the auto downloaded file.
What I need is as soon as I click on Print button on my PHP Web page, mPDF should create the output and immediately print the document using default printer. I even donot need any intermediate dialog box that would again get a confirmation to print. Simply, clicking on PHP based web page button should send the print command to the default printer.
I have tried the following code:
$mpdf->SetJS('[login to view URL]();');
This solution comes up with two problems:
1. It still opens a dialog for print confirmation.
2. It opens the print preview and the dialog box in my current tab which means that on clicking print, I cannot get the same interface on which I was working before clicking Print. For that, I have to click on back button on the browser which is not a good solution.
Another task is to launch the php project as a desktop application instead of running it from a browser.
Hi, I'm Himanshu from The Highsense Technologies.
we are expertise in developing such websites and applications as well as Softwares.
we will help you to solve your issues regarding Printing.
we send code for it!
we hope to here you soon!
thank you.