【问题标题】:Weasyprint not printing the pages spanning over more than one pageWeasyprint 不打印超过一页的页面
【发布时间】:2020-05-16 19:41:24
【问题描述】:

强文本

这是我用来将呈现的 html 页面转换为 pdf 的代码。

html_string = render_to_string("monthly_report/generated_pdf.html",
                                       {'form': form, 'month': monthStr.strftime("%B %Y")})
        html = HTML(string=html_string)
        main_doc = html.render()
        pdf = main_doc.write_pdf()
        return HttpResponse(pdf, content_type='application/pdf')

数据跨越一页以上的行被截断,数据丢失。 我想要的是剩余的数据应该打印在下一页上。 怎么可能实现??? 请帮忙,我从昨天开始就被它困住了。

【问题讨论】:

    标签: html css pdf weasyprint


    【解决方案1】:

    这个问题是由bug #36引起的,WeasyPrint还不能拆分表格单元格。

    【讨论】:

    • 感谢您的回复。有什么解决方法吗??
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多