wkhtmltopdf 修补了qt? [英] wkhtmltopdf patched qt?
问题描述
我正在尝试将多个 URL 转换为 PDF.但是,当我编译 wkhtmltopdf 或运行 apt-get install wkhtmltopdf
并尝试时,它说:
I'm trying to convert multiple URLs to PDF. However, when I compile wkhtmltopdf or run apt-get install wkhtmltopdf
and try, it says:
错误:此版本的 wkhtmltopdf 是针对未修补的 QT 版本构建的,并且不支持多个输入文档.
Error: This version of wkhtmltopdf is build against an unpatched version of QT, and does not support more then one input document.
如果我使用静态版本,我会收到分段错误错误.
If I use the static version, I get Segmentation fault error.
如何针对打过补丁的QT版本构建wkhtmltopdf,或者除了一一转换并重新组合之外还有其他解决方案吗?
How do I build wkhtmltopdf against a patched version of QT, or are there any other solutions besides converting one by one and reuniting?
我的操作系统是 Ubuntu 12.04 64 位.谢谢.
My OS is Ubuntu 12.04 64-bit. Thanks.
推荐答案
先查看源码
git clone git://gitorious.org/~antialize/qt/antializes-qt.git wkhtmltopdf-qt
cd wkhtmltopdf-qt
git checkout 4.8.4
QTDIR=. ./bin/syncqt
必须配置Qt,查看
cat ../wkhtmltopdf/static_qt_conf_base ../wkhtmltopdf/static_qt_conf_linux | sed -re 's/#.*//'
cd wkhtmltopdf-qt
./configure -nomake tools,examples,demos,docs,translations -opensource -prefix "../wkqt"
和Qt编译安装(这需要一段时间)
And Qt compiled and installed (this will take a while)
make -j3 && make install
cd ..
您现在必须在 wkhtmltopdf 文件夹中运行 qmake.
You must now run qmake in the wkhtmltopdf folder.
cd wkhtmltopdf
../wkqt/bin/qmake
这篇关于wkhtmltopdf 修补了qt?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!