PHPBuilder - PHP for PDF Page 2

RSS Twitter

PHP for PDF - Page 2

by: Luca Perugini
October 26, 2000

Installing PDFLib and PHP with PDF Support

  1. PHP 4.02+ from
  2. PDFLib 3.0.1 from
This is a little recipe to get PDFlib 3.0.1 working with PHP4:
  1. download PHP directly from Uwe Steinman patched ext/pdf/pdf.c to support PDFLib v 3.0.1

  2. download PDFLib 3.0.1 from
    1. apply every patch you find at
    2. Configure, Make & install PDFLib
      #./configure --enabled-shared-pdflib
      #make install
    You'll get PDFLib installed in /usr/local/lib .

  3. Configure PHP
           #./configure --with-apxs=/usr/bin/apxs \
              --with-gd  --with-pdflib=/usr/local --with-mysql=/usr/local \
              --with-config-file-path=/etc/httpd  --with-zlib-dir=/usr    \
              --with-ttf=/usr/local/include             \
              --with-jpeg-dir=/usr --with-tiff-dir=/usr \
              --with-system-regex=yes --enable-debug=no
           #make install

  4. Update System Library
           Insert  /usr/local/lib in  /etc/

  5. Test & Hack
    Now you need to restart Apache
           #apachectl restart
    Copy pdfclock.php in your httpd directory... test... and That's all.

Important Notes

To get working PDFLib with fonts you must pay attention to the UPR section of the PDFLib manual.
A simple way to use fonts with PDFLib is to copy the standard UPR description file included in PDFLib tarball, (fonts/pdflib.upr) into your working directory.

« Previous Page
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Luca Perugini



(Maximum characters: 1200). You have characters left.