zhtmltopdf- 把html页面转成pdf
PHP PDF工具包
访问GitHub主页
共0Star
详细介绍
zhtmltopdf, 把html页面转成pdf或image的php扩展
编译和安装
phpize
./configure
make
make install
得到的zhtmltopdf.so文件加入到你的php.ini里
用法
//参数1: 网址
//参数2: 输出的pdf文件名
//会生成pdf文件
zhtml2pdf("http://www.oschina.net", "./osc.pdf");
//参数1: 网址
//只输入参数,可直接到到pdf的数据, 可直接echo或输出到浏览器
$content = zhtml2pdf("http://www.oschina.net"");
echo $content;
//参数1: 网址
//参数2: 输出的img文件名
//会生成图片文件
zhtml2img("http://www.oschina.net"", "./osc.jpg");
//参数1: 网址
//只输入参数,可直接到到图片的数据, 可直接echo或输出到浏览器
$content = zhtml2img("http://www.oschina.net"");
echo $content;
推荐源码
-
2 Star
-
770 Star
-
7275 Star
-
146 Star
-
0 Star
-
300 Star
-
0 Star
-
0 Star
-
71 Star