【问题标题】:Rendering float divs from html to pdf将浮动 div 从 html 渲染为 pdf
【发布时间】:2014-04-08 08:56:01
【问题描述】:

有没有办法从带有浮动 div 的 html 生成 PDF(我可以为 div 使用固定的宽度和高度值)、边距和 Python 中的填充?有谁知道 python 库可以与这个 css 属性一起正常工作,或者可能是系统工具?任何信息都会有所帮助。

我已经尝试过 wkhtmltopdf。比萨立即排除...

【问题讨论】:

    标签: python pdf pdf-generation html-to-pdf


    【解决方案1】:

    不是python,但是你可以尝试http://phantomjs.org/simple js生成页面,然后调用.render生成pdf

    【讨论】:

    • 这将是一张图片,但来自phantomjs.org/screen-capture.html “除了PNG格式,PhantomJS还支持JPEG、GIF和PDF。” (我意识到这可能不是你想要的)
    猜你喜欢
    • 2018-02-16
    • 1970-01-01
    • 2013-07-31
    • 2020-04-12
    • 2016-10-14
    • 1970-01-01
    • 1970-01-01
    • 2010-11-25
    • 2011-02-10
    相关资源
    最近更新 更多