I am trying to print using PHP to a wireless printer. I googled and seems that php_printer.dll might work but I am unable to achieve the print after multiple attempts. I included the DLL file inside the extension_dir inside php.ini and added the line extension=php_printer.dll but it still did not load.
Is there any other ways for me to print a PDF to a wireless printer from PHP?
I think I should post my solution here which might be helpful to others.
After a bit of research, I decided to print by calling an application called "Foxit Reader" using shell_exec()
. But you will need to set the correct default printer so that "Foxit Reader" will print to the printer accordingly.
The reason for using "Foxit Reader" is because it does not leave the application running in the background after printing unlike Adobe Reader which will just leave a process running after printing.