我希望你能帮助我翻译一下关于IT技术的内容,涉及将HTML转换为PDF并在Web APP中使用。请告知可用的工具,并提供其他相关工具。
目前我已经尝试了:
html2ps htmlfilename > a.ps
ps2pdf a.ps > a.pdf
但是上述方法不能转换图片并且忽略了CSS。我的开发环境是Linux(RHEL5)。
我还尝试过http://www.webupd8.org/2009/11/convert-html-to-pdf-linux.html,但是出现了以下错误:
[root@localhost bin]# ./wkhtmltopdf www.example.com a.pdf
./wkhtmltopdf: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory
wkhtmltopdf
是你目前最好的选择。让它起作用。 - thirtydot