PHP头条
热点:

怎样在PHP中使用PDF文档功能


PHP捆绑PDFLIB库也许是最好的web出版平台了。一对典型的用法:

需求小册子
电子商务发货单

通过这个指南,你可以学会怎样使用php4中的PDF扩展来创建PDF文档。
我们也把焦点放在用mysql数据来创建PDF文档。

内容摘要


安装PDFLib 3.0.1 和有PDF支持的PHP4.01pl2(译注:你可以安装最新的php4.03pl1)

提取PDF文档
(我假设你有一点配置php的经验)


安装PDFLib和有PDF支持的PHP。

需求:

PHP 4.02 从 http://php.net 下载
PDFLib 3.0.1 从 http://www.pdflib.com 下载

这是一个怎样让PDFLib3.0.1和php4一起工作的小秘方:(老外很幽默的^_^)

直接从http://www.php.net下载 ext/pdf/pdf.c的补丁来支持PDFLib v 3.0.1

下载PDFLib3.0.1从此处 http://www.pdflib.com
适用的补丁你可以在此找到 http://www.pdflib.com/pdflib/patches.html

配置,Make和安装PDFLib

#./configure --enabled-shared-pdflib
#make
#make install
你会使得 PDFLib 安装在 /usr/local/lib .


配置 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


更新系统库
插入 /usr/local/lib 进 /etc/ld.so.conf (文件)

#/sbin/ldconfig


测试和验证
现在你需要重启apache
#apachectl restart


拷贝pdfclock.php 到的httpd目录中(就是web目录)...测试....一切正常。

重要信息

www.phpzy.comtrue/php/9386.htmlTechArticle怎样在PHP中使用PDF文档功能 PHP捆绑PDFLIB库也许是最好的web出版平台了。一对典型的用法: 需求小册子 电子商务发货单 通过这个指南,你可以学会怎样使用php4中的PDF扩展来创建PDF文档。...

相关文章

    暂无相关文章
相关频道:

PHP之友评论

今天推荐