I am generating a pdf file using mpdf and then emailing the PDF attachment using PHPMAILER.
I want to also print a copy of the PDF to a specified printer - silently without the print dialog box opening.
I would prefer to do this from PHP, but also dont mind if there is a better solution from javascript.
Please advise best way to do this.
$val = "test1.pdf";
$prAddr1="C:\Program Files (x86)\Foxit Software\Foxit Reader\Foxit Reader.exe";
exec(" \"$prAddr1\" /p $val ");
Pdf will get printed by the printer you specified as your default in Devices and Printers.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.