Install PDFLib with PHP

Image for Install PDFLib with PHP from

By Andrew McCombe
July 9, 2009

To install the PDFLib functionality you need to do the following (on an Ubuntu box).

cd /tmp
tar xvfz PDFlib-7.0.4p1-Linux.tar.gz</pre>

Then install PDFLib using pecl:

sudo pecl install pdflib

This will ask for the path to PDFlib headers. Select '1' and enter:


Then hit enter. It should then finish.

Finally, add the pdf module to the PHP configuration and restart apache:

sudo echo "" &gt; /etc/php5/conf.d/libpdf.ini
sudo /etc/init.d/apache2 restart

To check that it works, enter:

> php -i | grep "PDFlib GmbH"
PDFlib GmbH Version =&gt; 7.0.4p1