如何在 Linux (centos) 上安装带有 PHP 绑定的 wkhtmltopdf [英] How do I install wkhtmltopdf with the PHP bindings on Linux (centos)

查看:36
本文介绍了如何在 Linux (centos) 上安装带有 PHP 绑定的 wkhtmltopdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Linux (centos 5+) 上安装带有 PHP 绑定的 wkhtmltopdf?

How do I install wkhtmltopdf with the PHP bindings on Linux (centos 5+)?

我的问题与其他问题略有不同,因为我也需要有关设置 php 绑定的帮助.

My question is slightly different to the other questions because I need help setting up the php bindings as well.

谢谢

杰森

推荐答案

这里有一个更简单的方法来以编程方式调用 wkhtmltopdf:
http://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp

Here is a simpler method to programmatically invoke wkhtmltopdf:
http://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp

PHP 绑定对于这个应用程序来说真的是矫枉过正.在大多数情况下,您只需执行它即可:

PHP bindings are really overkill for this applicaiton. In the majority of cases you can get away with just executing it:

exec("wkhtmltopdf http://example.org/ pdf1.pdf");
$pdf = file_get_contents("pdf1.pdf");

这篇关于如何在 Linux (centos) 上安装带有 PHP 绑定的 wkhtmltopdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆