We recently helped a client install PDFLite on their server and it was a little more quirky than usual so we thought we’d share the installation process.
First of all, PDF Lite is the stripped down but free version of PDFLib. This library allows you to generate PDF files and can be quite handy. The easiest thing is to confuse the two versions, we’re using the Lite version which doesn’t have as many features but it’s free and doesn’t watermark your PDFs. The Lite version is good for just messing around with but if this is a commercial endeavor, you should get the full version found here : http://www.pdflib.com/
This tutorial installs the FREE Lite package version 7.03. Alright, let’s get started:
OS: CentOS 4.5/5,RHEL 4/5
Requires: PECL to be running and available and most likely has to be done as the root user
cd /usr/src
wget http://www.pdflib.com/binaries/PDFlib/703/PDFlib-Lite-7.0.3.tar.gz
tar xzpf PDFlib-Lite-7.0.3.tar.gz
cd PDFlib-Lite-7.0.3
./configure
make
make install
pecl install pdflib
The system will now ask you for the installation location of pdflib (path to pdflib installation?), put in:
/usr/local
Once it’s done installing, let’s finish this up:
cp /usr/local/lib/libpdf.so /usr/include/php/ext
echo "[libpdf]" >> /etc/php.ini
echo "extension=pdf.so" >> /etc/php.ini
service httpd restart
That should do it, check your phpinfo to make sure it works and go make some PDFs.
A long time client of ours,
One of our very own clients runs a popular domaining blog at