PHPBuilder - PHP for PDF Page 2



RSS Twitter
Articles Php Functions

PHP for PDF - Page 2

by: Luca Perugini
|
October 26, 2000

Installing PDFLib and PHP with PDF Support

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

  2. download PDFLib 3.0.1 from http://www.pdflib.com
    1. apply every patch you find at http://www.pdflib.com/pdflib/patches.html
    2. Configure, Make & install PDFLib
      #./configure --enabled-shared-pdflib
      #make
      #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
           #make install
        

  4. Update System Library
           Insert  /usr/local/lib in  /etc/ld.so.conf
    
           #/sbin/ldconfig
        

  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
1
|
2
|
3
|
4
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Luca Perugini

Comment:



Comment:

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