I have to print using php without getting print dialog.
I tried using printer_list in php. I installed printer dll. But it still shows error. How to fix this problem. I am using php 7
$getprt=printer_list( PRINTER_ENUM_LOCAL | PRINTER_ENUM_SHARED );
$handle = printer_open(getprt['NAME']);
if($handle) echo "connected";
else echo "not connected";
printer_start_doc($handle, "My Document");
printer_start_page($handle);
printer_write($handle,"Test Print.");
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
Getting following error
Call to undefined function
printer_list()
Comments
Post a Comment