Actually I have to print Report from php and iam using this code

$handle = printer_open("Microsoft XPS Document Writer");
$handle = printer_open();

bt iam getting following error
Fatal error: Call to undefined function printer_open() in C:\xampp\htdocs\praveen\printer.php on line 2
what i have to do next I try to search on google but did't get any help.

What I have done before this install XAMMP with windows, download php_printer.dll in extension folder and change php.ini

please help i am new to php and i really need this
thanks in advance to the master of php

This script will only work if the host has php_printer in their extensions...

@Matthew N.
Ya I have that file in extensions folder.......still I am getting the error

Have you added the extension file into the PHP.ini file?
It will look something like this :


Did you restart your server after installing the extension?

ya I try

And as vidit_X said, did you restart server after each change?

Is there any problem with version, actually i read some wher in google search that every version of php is not support php_printer.dll if some like that please suggest me the right version is possible link of downloadable site.

Just check for a page about php_print, it's most likely at the homepage, or in their faq. and you can get legacy php versions from PHP.net if that's necessary.

Having said that, did you try running the server with admin priviliges?