我对 wicked_pdf 页脚渲染没有什么问题。
这是我的渲染方法:
def invoice
render pdf: "#{@order.number}.pdf",
footer: { html: { template: "admin/orders/invoice_footer.html" } },
margin: { bottom: 25 }
end
PDF 渲染工作正常,但没有页脚模板。我在恶劣的环境中尝试了不同的边距,但没有成功。
刚刚遇到了同样的问题,问题似乎是我的 wkhtmltopdf 安装没有按要求生成页脚。
我的版本是通过 Ubuntu 存储库安装的,我卸载了它并下载了一个预构建的版本,如下所述,现在它工作正常:
https://github.com/mileszs/wicked_pdf/wiki/Getting-Started-Installing-wkhtmltopdf https://github.com/mileszs/wicked_pdf/wiki/Getting-Started-Installing-wkhtmltopdf
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)