How to install pdflib on WAMP Server

ahmer picture ahmer · Sep 10, 2011 · Viewed 12.4k times · Source

I want to install pdflib on my wampserver2.

I have downloaded pdflib and I've set the following line:

extension=php_pdflib.dll

in my php.ini file, but I'm still getting a Call to undefined function pdf_new() error.

Answer

Rainer picture Rainer · Sep 12, 2011

You must copy the libpdf_php.dll to the extension directory of your php installation (check for extension_dir in your phpinfo() output).

Also take care to use the version of PDFlib that matches your php version and compiler (multiple versions are included in the download you mentioned).

Then add extension=libpdf_php.dll to the php.ini (you can also find it's location listed in the phpinfo() output, just look for php.ini).

Restart your webserver and check if you have a "PDF" entry in your phpinfo() and if so, congratulations!

If you want more detailed information about PDFlib and it's use in php , be sure to check out the online php howto(a pdf link, of course) and also consult the documentation included in your download package.