是否有支持 CSS3 Columns 的 wkhtmlto(pdf/image) 版本?
我使用 wkhtmltopdf 和 wkhtmltoimage 来生成预览图像和 pdf 文档。唯一的问题是,我需要专栏支持。让它与 Javascript 一起工作变得非常耗时,而且真的一事无成。
是否有针对支持 CSS3 的 QT 版本构建的构建下载?我似乎在寻找所述构建时遇到问题。
I am using both wkhtmltopdf and wkhtmltoimage to generate my preview image and a pdf of a document. The only problem is, I need column support. Getting it to work with Javascript is becoming time consuming and really getting me nowhere.
Is there a build download out that has been built against a version of QT that has CSS3 support? I seem to be having problems finding said build.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
随着Qt5的发布,QtWebKit据说将有更多的HTML5支持。您可以尝试在 Qt5 上构建 wkhtmltopdf,或者,如果您不喜欢这样,请尝试 WebKit 的主干源构建并使用 QMake 项目文件进行构建。祝你好运 - WebKit 的构建是一场噩梦。
编辑:启动了 wkhtml2pdf 的 Qt5 端口,但显然它(默认情况下)需要自定义构建 WebKit,而我没有时间或技能来做。请参阅 https://github.com/antialize/wkhtmltopdf/pull/18 了解我的工作迄今为止。
With the release of Qt5, QtWebKit is said to have more HTML5 support. You could try building wkhtmltopdf on Qt5, or, if you don't like that, try a trunk-source build of WebKit and use the QMake project files to build. Good luck with that - WebKit is a nightmare to build.
EDIT: Started a Qt5 port of wkhtml2pdf, but apparently it (by default) needs a custom build of WebKit that I don't have the time or skills to do. See https://github.com/antialize/wkhtmltopdf/pull/18 for my work so far.
PhantomJS 是围绕 QtWebKit 构建的,在一定程度上支持CSS3。检查这个示例,它呈现 PDF(可以轻松修改为输出 PNG):
https://github.com/ariya/phantomjs/blob/master/examples/rasterize.js
要检查您感兴趣的 CSS3 选择器的支持,只需渲染相应的官方测试套件页面:http://www.w3.org/Style/CSS /Test/CSS3/Selectors/current/xhtml/index.html
PhantomJS is built around QtWebKit, which supports CSS3 to some extent. Check this example, which renders PDF (can be easily modified to output PNG):
https://github.com/ariya/phantomjs/blob/master/examples/rasterize.js
To check the support of the CSS3 selector you're interested in, just render the correspondent official test suite page: http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/xhtml/index.html