Php – installing php_printer on wamp server

PHPwampserver

Ive been googling around on how to install the php_printer.dll for wamp server, nothing came up. Perhaps, anyone know how to install that ext? Basically, im trying to use php printer function and i need that extension as i heard. i tried http://www.issociate.de/board/goto/751941/Call_to_undefined_function_printer_open().html to install on wamp server, but still give me error in the webpage? i added the extension: php_printer.dll in php.ini

testing code:
<?php
$filename = "test page";
///////
ob_start();
include $filename;
$contents = ob_get_contents();
ob_end_clean();
///////
$handle = printer_open("HP80AA62");
printer_set_option($handle, PRINTER_MODE, "raw"); 
printer_write($handle,$contents);
printer_close($handle);
?>

Best Answer

Although I don't have much experience with installing/enabling extensions myself, this has worked for me in the past:

  1. Ensure that php_printer.dll is listed under the "ext" directory inside of your PHP installation. If it isn't there, you will need to download that extension and save it under the "ext" directory.
  2. Add the extension inside of php.ini.
  3. Reboot your server and try again.

Hope that helps,
spryno724

Related Topic