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.
#1 by pradip on October 3rd, 2008
Quote
test this pdf
#2 by Randy Henderson on January 21st, 2009
Quote
If your /tmp directory is mounted noexec and
pecl install pdflib fails
Try the following
(Note: 2.1.5 was the latest at the time I added this note)
cd /usr/src
wget http://pecl.php.net/get/pdflib-2.1.5.tgz
tar -zxf pdflib-2.1.5.tgz
cd pdflib-2.1.5
phpize
./configure –prefix=/usr/local
make && make install
#3 by Josh on November 16th, 2009
Quote
Can anyone please help me with installing pdflib 7 on centos 5.2. I am trying to install it but it doesnt support the ./configure command.
cd /usr/src
wget http://www.pflib.com/binaries/PDFlib/704/PDFlib-7.0.4p6-Linux-php.tar.gz
tar xzpf PDFlib-7.0.4p6-Linux-php.tar.gz
cd PDFlib-7.0.4p6-Linux-php
./configure
#4 by yaswanth on November 25th, 2009
Quote
i am using centos i downloaded using the following command
wget http://www.pdflib.com/binaries/PDFlib/704/PDFlib-7.0.4p6-Linux-php.tar.gz
and i extracted into the /usr/src/ after tha i wrote a command cd PDFlib-7.0.4p6-Linux-php then i went to the extracted directory then i wrote a command ./configure but this time i am getting error No such file or directory what should i do can u please help me